468,258 Members | 1,509 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,258 developers. It's quick & easy.

Opening more than 1 table via the iDB2DataAdapter

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
1 4321
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.

Similar topics

2 posts views Thread by Kristof Bonnast | last post: by
16 posts views Thread by Phil Stanton | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.