Re: OCIBindByName; ORA-24328: illegal attribute value

From: Geoff Denning <geoff_denning_at_hotmail.com>
Date: Tue, 19 Mar 2002 13:59:03 -0800
Message-ID: <NtOl8.331$8Y5.1418_at_news.bc.tac.net>


In case anyone is interested, I figured out the problem.

There appears to be a bug in the Solaris version of OCIAttrSet. It expects the attribute value in little endian format. You need to swap the bytes of the attribute value before you pass it to OCIAttrSet. I'm not sure if this is the case for all OCIAttrSet calls, or just OCI_ATTR_CHARSET_FORM, but it fixed the problem for me. I hope this saves someone else some grief.

"News" <geoff_denning_at_hotmail.com> wrote in message news:kxtl8.309$8Y5.1397_at_news.bc.tac.net...
> Does anyone here have experience using OCI on Solaris? I'm getting the
> error above (illegal attribute value) as a result of the following call on
> Solaris, but it works perfectly on NT!
>
> Any suggestions?
>
> ub2 l_NCHAR_CS_ID = SQLCS_NCHAR;
>
> int l_Result = OCIAttrSet((dvoid *) l_Binding[l_Index], (ub4)
> OCI_HTYPE_BIND, (dvoid *) &l_NCHAR_CS_ID, (ub4) 0,
> (ub4)OCI_ATTR_CHARSET_FORM, Error);
>
>
>
Received on Tue Mar 19 2002 - 22:59:03 CET

Original text of this message