By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,756 Members | 1,668 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,756 IT Pros & Developers. It's quick & easy.

Opening more than 1 table via the iDB2DataAdapter

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.