That error means that there is no data in the table. For the time being do this (so you can figure out where the problem is.
dim tbl as new datatable
dim iTbl as integer
For each tbl in dataset21.Tables
for each dr in tbl.rows
response.write(iTbl)
lblDesc.Text = dr.Item("Description")
lblID.Text = dr.Item("ID")
lblUnitprice.Text = dr.Item("UnitPrice")
next
i += 1
next
(Instead of writing the value of iTbl out to the screen you can just step through the code) In any case, whatever the value of iTbl is (when it is wrote to the screen) is the table your data is residing in (it should be 0 but the error you are getting says otherwise).
If there is any data in any of the tables in the dataset it will be retrieved here.
"The one language all programmers understand is profanity."
|