I can't seem to get this to work, this is an untyped dataset. Does that make a difference?
Bob Learned
No, that is code for an untyped DataSet.
I used table names, rather than ordinal index (DataSet1.Tables("Table1") and not DataSet1.Tables(0)). If you don't have the table alias correct, you will get an exception.
Also, if you have a DataSet with only a single DataTable, then I would think about just using a DataTable, because of the extra overhead for the DataSet.
Bob
bergertime
ASKER
Here is my code: It does not error, just does not return anything
Dim cn As iDB2Connection = New iDB2Connection("User ID=me;Password=me;Data Source=10.1.1.253;Connection Timeout = 0")
Dim cmd As iDB2Command
Dim sqlstring As String
sqlstring = "select substr(vaactdat,5 ,2) as MONTH, substr(vaactdat,7 ,2) as DAY, substr(vaactdat,3 , 2) as YEAR, vaseq#, vauser, vadesc from lib.table"
Dim da As New iDB2DataAdapter(sqlstring, cn)
'Open connection
cn.Open()
cmd = New iDB2Command(sqlstring, cn)
Try
da.Fill(DataSet1)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try