Unix Technical Forum

Opening more than 1 table via the iDB2DataAdapter

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


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 01:46 AM
Kristof Bonnast
 
Posts: n/a
Default 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 01:51 AM
Kristof Bonnast
 
Posts: n/a
Default Re: 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:05 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com