Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

64bit unsigned long and SQLT_NUM in OCI

631687Apr 2 2008 — edited Dec 17 2008
Hi all,

I'm trying to insert in a NUMBER(38) field a values which is a 64bit integer.
Obviously I have to test if it works with the max allowed value (2^64 -1).
I Use OCIBindByName:

tag_to_insert = 18446744073709551615UL;
rc = OCIBindByName(p_sql, &p_bnd, p_err, (text *) ":taggo", -1, (dvoid *) &tag_to_insert, sizeof(unsigned long), SQLT_NUM, (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);

Problem is: if use SQLT_NUM no rows gets inserted into DB, if I use SQLT_INT I get a value of -1 instead of the correct one of 18446744073709551615.

What am I missing ?

I'm using Oracle11-64bit on a 64bit RedHat.
Any clues ?

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 14 2009
Added on Apr 2 2008
12 comments
7,575 views