Re: OCI UPDATE QUERY
From: Al Vancleef <alvancleef_at_mail.com>
Date: 12 Jun 2002 12:38:14 -0700
Message-ID: <43008805.0206121138.229ef724_at_posting.google.com>
Date: 12 Jun 2002 12:38:14 -0700
Message-ID: <43008805.0206121138.229ef724_at_posting.google.com>
Hi Alex,
I would use different names for the placeholders, like this
OCIStmtPrepare(stmtHandle, errorHandle, stmt,
(ub4)strlen((char*)"update table1 set sec = :sec_new where sec = :sec_old"),
OCI_NTV_SYNTAX, OCI_DEFAULT);
OCIBindByName(stmtHandle, &bindHandle, errorHandle,
(text*)":sec_new", -1, &input2, (sword)sizeof(input2), SQLT_INT, 0, 0, 0,
0, 0, OCI_DEFAULT);
OCIBindByName(stmtHandle, &bindHandle, errorHandle,
0, 0, OCI_DEFAULT);
Hope it helps.
I posted a question named OCI Sample yesterday. Please have a look at it.
Al Received on Wed Jun 12 2002 - 21:38:14 CEST