Re: Insert Row into IBM DB2 (AS400)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • Re: How can I execute a query/datareader connecting to Pervasive SQL2000i Database table and a Parad
    ... DB1 is say a Pervsive SQL Db. ... In Db2 you ... have anotherTable with column2. ... DataReader b/c it can only have one connection at a time and it needs to ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Insert Row into IBM DB2 (AS400)
    ... The OLE DB Provider I am using does this. ... Connect to it via the SQL ... binding connection back to the ODBC connection. ... DB2 table. ...
    (microsoft.public.sqlserver.dts)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... SQL CE/Mobile has a background thread that flushes the changes ... they run for long hours and we have not seen memory leaks so far. ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)
  • Re: Concurrent database access in SQL 2005 Mobile
    ... Please stick to having an "dummy" connection in Open State. ... So it is a kind of asynchronous commit which happens every 10 ... I am not sure of this claim as we have many applications built on SQL CE ... then opens his work forms and it's in ...
    (microsoft.public.sqlserver.ce)
  • Access 2003 adp/proxy security - A substitute for SYSTEM_USER()
    ... We need a way for SQL to know the nt username that initiated the proxy ... Many stored procedures and views use a UDF that also depends on ... SyUserLogin and use HostIDand HostName() to find the right row. ... We've played with the Connection dialog settings, ...
    (microsoft.public.access.security)