dbTalk Databases Forums  

Insert Row into IBM DB2 (AS400)

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Insert Row into IBM DB2 (AS400) in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
accyboy1981
 
Posts: n/a

Default Insert Row into IBM DB2 (AS400) - 06-20-2006 , 10:31 AM






Hi

I'm creating a DTS Package that will move data (insert) from a SQL
Server table into a
DB2 (AS400) table. I'm using a data driven query, in the source I'm
selecting a local sql server table, the destination is the db2 (AS400)
table (connected via ODBC). The transformation is the autogenerated
ActiveX Script. All the above seems correct but when I try and add an
insert Query I get the following error when I try to parse/show
parameters:

HResult 0x80040e14 (-2147217900) returned
Unexpected error occured. An error result was returned without an error
message.

The sql insert statement is:

INSERT INTO JHTEST (PARENT, COMPNT, "DESC")
VALUES (?,?,?)

Neither table have primary keys, and the tables only consist of 3
columns.

Any help would be much appreciated.

Thanks

Simon


Reply With Quote
  #2  
Old   
Nick
 
Posts: n/a

Default Re: Insert Row into IBM DB2 (AS400) - 06-20-2006 , 11:08 AM






The OLE DB Provider I am using does this. Some cannot handle
Parameters. You may need to create a dummy SQL db with a table that has
the same structure as your db2 table. Connect to it via the SQL
Provider and write out yout insert. Do your parse/show and correct
your parameter order - once you have okayed this you can change your
binding connection back to the ODBC connection.

Not sure if this helps or not but it is what I have to do.

Nick

accyboy1981 wrote:
Quote:
Hi

I'm creating a DTS Package that will move data (insert) from a SQL
Server table into a
DB2 (AS400) table. I'm using a data driven query, in the source I'm
selecting a local sql server table, the destination is the db2 (AS400)
table (connected via ODBC). The transformation is the autogenerated
ActiveX Script. All the above seems correct but when I try and add an
insert Query I get the following error when I try to parse/show
parameters:

HResult 0x80040e14 (-2147217900) returned
Unexpected error occured. An error result was returned without an error
message.

The sql insert statement is:

INSERT INTO JHTEST (PARENT, COMPNT, "DESC")
VALUES (?,?,?)

Neither table have primary keys, and the tables only consist of 3
columns.

Any help would be much appreciated.

Thanks

Simon


Reply With Quote
  #3  
Old   
accyboy1981
 
Posts: n/a

Default Re: Insert Row into IBM DB2 (AS400) - 06-20-2006 , 11:22 AM



Hi Nick,

Once you copy the data into the dummy SQL database how exactly do you
get it to the db2 database. I dont quite follow.

Thanks

Simon

Nick wrote:
Quote:
The OLE DB Provider I am using does this. Some cannot handle
Parameters. You may need to create a dummy SQL db with a table that has
the same structure as your db2 table. Connect to it via the SQL
Provider and write out yout insert. Do your parse/show and correct
your parameter order - once you have okayed this you can change your
binding connection back to the ODBC connection.

Not sure if this helps or not but it is what I have to do.

Nick

accyboy1981 wrote:
Hi

I'm creating a DTS Package that will move data (insert) from a SQL
Server table into a
DB2 (AS400) table. I'm using a data driven query, in the source I'm
selecting a local sql server table, the destination is the db2 (AS400)
table (connected via ODBC). The transformation is the autogenerated
ActiveX Script. All the above seems correct but when I try and add an
insert Query I get the following error when I try to parse/show
parameters:

HResult 0x80040e14 (-2147217900) returned
Unexpected error occured. An error result was returned without an error
message.

The sql insert statement is:

INSERT INTO JHTEST (PARENT, COMPNT, "DESC")
VALUES (?,?,?)

Neither table have primary keys, and the tables only consist of 3
columns.

Any help would be much appreciated.

Thanks

Simon


Reply With Quote
  #4  
Old   
Nick
 
Posts: n/a

Default Re: Insert Row into IBM DB2 (AS400) - 06-22-2006 , 04:02 AM



Hi Simon

You don't actually copy the data to the dummy table/database, you just
connect to it in order to parse your DDQ parameters. Once they are
parsed, you can change your connection back to your ODBC connection,
and re-order the parameters as necessary.

Nick

accyboy1981 wrote:
Quote:
Hi Nick,

Once you copy the data into the dummy SQL database how exactly do you
get it to the db2 database. I dont quite follow.

Thanks

Simon

Nick wrote:
The OLE DB Provider I am using does this. Some cannot handle
Parameters. You may need to create a dummy SQL db with a table that has
the same structure as your db2 table. Connect to it via the SQL
Provider and write out yout insert. Do your parse/show and correct
your parameter order - once you have okayed this you can change your
binding connection back to the ODBC connection.

Not sure if this helps or not but it is what I have to do.

Nick

accyboy1981 wrote:
Hi

I'm creating a DTS Package that will move data (insert) from a SQL
Server table into a
DB2 (AS400) table. I'm using a data driven query, in the source I'm
selecting a local sql server table, the destination is the db2 (AS400)
table (connected via ODBC). The transformation is the autogenerated
ActiveX Script. All the above seems correct but when I try and add an
insert Query I get the following error when I try to parse/show
parameters:

HResult 0x80040e14 (-2147217900) returned
Unexpected error occured. An error result was returned without an error
message.

The sql insert statement is:

INSERT INTO JHTEST (PARENT, COMPNT, "DESC")
VALUES (?,?,?)

Neither table have primary keys, and the tables only consist of 3
columns.

Any help would be much appreciated.

Thanks

Simon


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.