Hi,
I'm trying to get a OCIBindByName to work with text but it never works. The
following works when I convert the text to a INT first
checkerr(errhp, OCIBindByName(stmthp1, &bndhp, errhp, (text *) ":MMSREF",
strlen(":MMSREF"),
(dvoid *) &mmsRefNo, (sb4) sizeof(mmsRefNo), SQLT_INT,
(dvoid *) 0, (ub2 *)0, (ub2 *)0,
(ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT));
But if I try
TEXT mmsRef[32];
checkerr(errhp, OCIBindByName(stmthp1, &bndhp, errhp, (text *) ":MMSREF",
strlen(":MMSREF"),
(dvoid *) &mmsRef, (sb4) sizeof(mmsRef), SQLT_TXT,
(dvoid *) 0, (ub2 *)0, (ub2 *)0,
(ub4) 0, (ub4 *) 0, (ub4) OCI_DEFAULT));
Then there are no errors but no record is found. It should be noted that
sometimes mmsRef may only use 8 characters then a null.
What am I doing wrong?
Thanks,
John
John Savill MCSE MVP