Page 1 of 1

odbc problem with DB2 cannot upsert

Posted: Thu Oct 30, 2008 11:32 am
by kjaouhari
Hi Folks !

I have an issue with the odbc stage, when I want to upsert in a db2 table.
If I use the insert then update then I get the error message :

ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for OS/390 and z/OS]INSERT/UPDATE INVALID; INDEX IDX44 RESTRICTS COLUMNS WITH SAME VALUES. 0000004201

Followed by this fatal error message :
ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver]Value has not been specified for parameter 21.

But If I use the update then insert then it works fine,

Any clue ?

Thanks in advance

Posted: Thu Oct 30, 2008 11:44 am
by ArndW
Yes, if the record already exists then the "insert" generates the error you posted. If you do an update first, then an insert, you will not see this error.

Posted: Thu Oct 30, 2008 11:53 am
by kjaouhari
Ok so nothing to investigate then ... too bad :lol:

Posted: Thu Oct 30, 2008 11:55 am
by kjaouhari
Ok so nothing to investigate then ... too bad :lol:

Re: odbc problem with DB2 cannot upsert

Posted: Tue Apr 28, 2009 3:39 pm
by ririr
Hi Kjaouhari,

Can you please share the steps you executed to setup the ODBC for DB2.
I get SMEC error when I try to bind DB2 ODBC database.

./bind19 XXXXXX(ODBC)
User Name: abcdef
Password: xxxxxx
Package creation failed!: SECMEC value not supported, check for missing user/password.


Package creation failed!: SECMEC value not supported, check for missing user/password.
kjaouhari wrote:Hi Folks !

I have an issue with the odbc stage, when I want to upsert in a db2 table.
If I use the insert then update then I get the error message :

ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for OS/390 and z/OS]INSERT/UPDATE INVALID; INDEX IDX44 RESTRICTS COLUMNS WITH SAME VALUES. 0000004201

Followed by this fatal error message :
ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver]Value has not been specified for parameter 21.

But If I use the update then insert then it works fine,

Any clue ?

Thanks in advance

Re: odbc problem with DB2 cannot upsert

Posted: Tue Apr 28, 2009 3:40 pm
by ririr
Hi Kjaouhari,

Can you please share the steps you executed to setup the ODBC for DB2.
I get SMEC error when I try to bind DB2 ODBC database.

./bind19 XXXXXX(ODBC)
User Name: abcdef
Password: xxxxxx
Package creation failed!: SECMEC value not supported, check for missing user/password.

kjaouhari wrote:Hi Folks !

I have an issue with the odbc stage, when I want to upsert in a db2 table.
If I use the insert then update then I get the error message :

ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver][UDB DB2 for OS/390 and z/OS]INSERT/UPDATE INVALID; INDEX IDX44 RESTRICTS COLUMNS WITH SAME VALUES. 0000004201

Followed by this fatal error message :
ODBC_Enterprise_108,0: [DataDirect][ODBC DB2 Wire Protocol driver]Value has not been specified for parameter 21.

But If I use the update then insert then it works fine,

Any clue ?

Thanks in advance

Posted: Tue Apr 28, 2009 10:06 pm
by chulett
:!: You need to start your own post on this subject, not hi-jack another thread where the only common element is the database vendor.