This is a discussion on Opening more than 1 table via the iDB2DataAdapter within the DB2 forums, part of the Database Server Software category; --> Hello, With the SQLDataAdapter it's possible to load more datatables via 1 fill command. ex: dim sqlstmt as string ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, With the SQLDataAdapter it's possible to load more datatables via 1 fill command. ex: dim sqlstmt as string = "SELECT * FROM Customers; SELECT * FROM Orders" dim conString as string = "server=localhost;database=Northwind;uid=sa;pw d=;" dim da as new SQLDataAdapter(sqlstmt,conString) da.fill(ds) .... Is there a way to do this with the iDB2DataAdapter. I'm using the .NET provider from Client Access V5R3. I tried the following: Dim cnString As String = "DataSource=myAS400" Dim sqlString As String = "select * from JDACOM.FWF20 where WHDOCO = X;select * from JDACOM.FWF21 where WDDOCO = X" Dim da As iDB2DataAdapter = New iDB2DataAdapter(sqlString, cnString) da.fill(ds) .... But I get the following error : SQL0104 Token ; was not valid. Valid tokens: <END-OF-STATEMENT>. Exception Details: IBM.Data.DB2.iSeries.iDB2SQLErrorException: SQL0104 Token ; was not valid. Valid tokens: <END-OF-STATEMENT>. Does anyone have any idea ? Thanks in adavance... have a nice day.. Kristof Bonnast |
| ||||
| Hello, With the SQLDataAdapter it's possible to load more datatables via 1 fill command. ex: dim sqlstmt as string = "SELECT * FROM Customers; SELECT * FROM Orders" dim conString as string = "server=localhost;database=Northwind;uid=sa;pw d=;" dim da as new SQLDataAdapter(sqlstmt,conString) da.fill(ds) .... Is there a way to do this with the iDB2DataAdapter. I'm using the .NET provider from Client Access V5R3. I tried the following: Dim cnString As String = "DataSource=myAS400" Dim sqlString As String = "select * from JDACOM.FWF20 where WHDOCO = X;select * from JDACOM.FWF21 where WDDOCO = X" Dim da As iDB2DataAdapter = New iDB2DataAdapter(sqlString, cnString) da.fill(ds) .... But I get the following error : SQL0104 Token ; was not valid. Valid tokens: <END-OF-STATEMENT>. Exception Details: IBM.Data.DB2.iSeries.iDB2SQLErrorException: SQL0104 Token ; was not valid. Valid tokens: <END-OF-STATEMENT>. Does anyone have any idea ? Thanks in adavance... have a nice day.. Kristof Bonnast |