浏览数据集

时间:2016-07-09 15:55:27

标签: vb.net dataset

' 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")

当我到达Dim colCatCategoryID As DataColumn = tblCategories.Columns("CategoryID")时,收到以下错误消息:

  

对象引用未设置为对象的实例。

0 个答案:

没有答案