Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Fernandez
Creator II
Creator II

DB2 input OK / DB2 output KO

Hi,

 

With same parameters for DB2 connection, it's OK when I use the component tDB2Input but I get an error when I use the component tDB2Output :

com.ibm.db2.jcc.am.SqlSyntaxErrorException0683p000009MACJ.pngB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=idutil.DOC_OBJ, DRIVER=4.17.29

 

0683p000009M0Ii.png

 

The user has access to insert into database.

I see a precedent post about this subject (https://www.talendforge.org/forum/viewtopic.php?id=2197), that indicates to put into Database field:

context.DB_Database+":currentSchema="+context.DB_Schema

 

But I get also an error...

 

Can somebody help me please ?

 

Thanks

 

 

Labels (2)
1 Solution

Accepted Solutions
fdenis
Master
Master

tdbInput use select queries it all time work fine.
for tDboutput it's insert and or update queries with use of parameters with sometime validation or conversion to use db charset and nls.

you can try to use tDB2row and write an insert query it will work but it's not optimized.

can you or your dba check db configuration.

View solution in original post

10 Replies
fdenis
Master
Master

it's a db2 error check your configuration.
http://www-01.ibm.com/support/docview.wss?uid=swg21613531
Fernandez
Creator II
Creator II
Author

Hi,

 

I don't think it's a problem of DB2 configuration because we don't get any issues whith the same configuration when we insert datas with another technology (for example C#).

 

fdenis
Master
Master

this error is returned by ibm bd2 driver.
if you read c# you may read java an check it on debug mode.
first question are you on db2 or on an as400 db2?
did you try using an other driver ODBC or jdbc?
Regards,
Fernandez
Creator II
Creator II
Author

I am on db2 and I'm using IBM DB2 ODBC Driver.

 

As explained, when i'm using tDB2Input with same configuration, it works fine...

 

Regards,

Anonymous
Not applicable

Can you show us your config for the component that does work? Also, do you actually have a table called "MyTable" in your database and does your user have access to it?

fdenis
Master
Master

tdbInput use select queries it all time work fine.
for tDboutput it's insert and or update queries with use of parameters with sometime validation or conversion to use db charset and nls.

you can try to use tDB2row and write an insert query it will work but it's not optimized.

can you or your dba check db configuration.

Fernandez
Creator II
Creator II
Author

Hi,

 

Thanks François.

It's working fine with tDB2row:0683p000009M01n.png

 

I am not a db specialist, so for my information what do you mean with "...to use db charset and nls" ?

 

 

fdenis
Master
Master

your db store your data.
but when the db retrieve data they are formated with nls languages
(samples: for fr date are dd/mm/yyyy for us date are mm.dd.yyyy)

when db store Strin it may be ascii UTF8 UTF16 or any ISO charset
your db is configured to store what you nead.

in our case tdbOuput use insert into tb (field1,field2) values (?,?)
then it just have to send the two parameters(represented by ?) to be inserted.
driver have to support this type of insert.


fdenis
Master
Master

are you using insert with parameters in c#?