Author: john_paul | Posted on: 4/15/2009 4:46:43 PM | Views : 440

When the vb code was in the aspx page the web program built and displayed the data properly. However, I want to move the vb code from the aspx page to the code behind page and I am getting this error when I build: Type DataRowView is not defined.  Here is the code that was in the aspx page and moved to the code behind page:

 ' create a relationship between the two tables in the DataSet
 ' first get references to the primary key in the MenuItems table
  ' and the foreign key in the SizeAndPrice table

Dim pkcol As DataColumn = ds.Tables("MenuItems").Columns("MenuItemID")
Dim fkcol As DataColumn = ds.Tables("SizeAndPrice").Columns("fkMenuItemID")

' now create the relationship within the DataSet
Dim dr As New DataRelation("MenuLink", pkcol, fkcol)

' add this relationship to the Relations collection of the DataSet
ds.Relations.Ad ...

Go to the complete details ...