Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> need help with OCIBindByPos

need help with OCIBindByPos

From: Dirk Michael <michael.dirk_at_web.de>
Date: Wed, 10 Sep 2003 18:35:50 +0200
Message-ID: <bjnjt6$la27j$1@ID-142531.news.uni-berlin.de>


Hi

i have a little problem with OCIBindByPos. i have an prepared statement like this:
INSERT INTO test VALUES (:p1)
where :p1 should be an integer value.

Now i try to bind an integer value to p1:

int value = 99;
OCIBindByPos(m_ociStmt,

          &bindpp,
          m_ociError,
          1,

(dvoid*)&value,
(sb4)sizeof(value),
SQL_INT,
(dvoid*)0,
(ub2*)0,
(ub2*)0,
(sb4)0,
(ub4*)0,
OCI_DEFAULT)

This works fine and when i execute the statement, no error occures. But if I look in the table then he sets this value not 99 but to 4125150 or so. Where is my mistake? Thanks!
--
Regards
Dirk Michael
Received on Wed Sep 10 2003 - 11:35:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US