I've got some code that should just fill a dataset, transfer it into a DataTable, add the DataTable to another DataSet. I'm not sure why it's not working the error number I get is 91, and the description for it is 91. Very helpful... This is the code I'm using:
Any ideas on what could be causing my problem would be greatly appreciated.
Code:
Dim dsRet As DataSet
Dim dsTemp As DataSet
Dim dtTemp As DataTable
Try
dsTemp = Connect("Select * from ShiftReport where ShiftCount = " & strKey)
dtTemp = dsTemp.Tables(0)
MsgBox(dtTemp.Rows.Count)
dsRet.Tables.Add(dtTemp)
dsTemp = Connect("Select * from TimesheetInfo where Entry = " & strKey)
dtTemp = dsTemp.Tables(0)
dsRet.Tables.Add(dtTemp)
Catch ex As Exception
MsgBox(Err.Number & ": " & Err.Number)
End Try
Return dsRet
Any ideas on what could be causing my problem would be greatly appreciated.