I am getting an error trying to add a new table to my dataset, "Object reference not set to an instance of an object". (Usually this means I left out a "New" keyword somewhere.)
Here's what I've got:
Code:
dim ds as New Dataset
Dim myTable As New DataTable
Dim newRow As DataRow
newRow.Item("myItem") = somevalue
myTable.Rows.Add(newRow)
dsResult.Tables.Add("myTable")
Return dsResult
It compiles ok, but I get that error at runtime. I think I am missing a step in here with adding in the Item, but I'm not sure.
Thanks in advance for your comments.
- - - - - - - - - - - - - - - - - - - - - - -
In God we trust, everything else we test.