' Create two instances of the `DataTable` object to reference the two tables
Dim tblCategories As DataTable = DS.Tables("Categories")
Dim tblProducts As DataTable = DS.Tables("Products")
' Create two DataColumn objects to reference the columns on which the relation is based
Dim colCatCategoryID As DataColumn = tblCategories.Columns("CategoryID")
Dim colProdCategoryID As DataColumn = tblProducts.Columns("CategoryID")
When I get to Dim colCatCategoryID As DataColumn = tblCategories.Columns("CategoryID")
I get the following error message:
Object reference not set to an instance of an object.