Re: Dealing with multi-byte character using OCI on HP-UX

From: Jason Liang <jsnliang_at_hotmail.com>
Date: 14 Nov 2004 21:05:25 -0800
Message-ID: <e35f0def.0411142105.46e3249_at_posting.google.com>


[Quoted] Hi Frank,

The enviroment is Oracle Database 10g Release 10.1.0.2.0 64bit production on HP-UX, the server and client(my program) are on same box. I set three variables:

set ORACLE_HOME=/app/oracle/OraHome_1
set ORA_NLS33=/app/oracle/OraHome_1/nls/data set NLS_LANG=japanese_japan.ja16sjis

Got a error message error message at OCILogon -- Error while trying to retrieve text for error ORA-12705.

A fragment of the program used to write data into database as follows.

    text *sql = (text *) "insert into MESSAGELOG(\"DATE\", \"TIME\", " \

                       "TID, DIR, MLEN, MESSAGE) " \
                       " values(:cdate, :ctime, :tid, :dir, :len,
:msg) ";

    OCIStmtPrepare(oci_stmhp, oci_errhp, sql, (ub4)strlen((char *)sql),

                   (ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT);

    OCIBindByPos(oci_stmhp, &bnd1p, oci_errhp, 1, (dvoid *)cdate,
(sb4)cdlen,

                 SQLT_AFC, (dvoid *)0, (ub2 *)0, (ub2 *)0, (ub4)0,

(ub4 *)0,
OCI_DEFAULT);

    OCIBindByPos(oci_stmhp, &bnd2p, oci_errhp, 2, (dvoid *)ctime,
(sb4)ctlen,
                 SQLT_AFC, (dvoid *)0, (ub2 *)0, (ub2 *)0, (ub4)0,

(ub4 *)0,
OCI_DEFAULT);

    OCIBindByPos(oci_stmhp, &bnd3p, oci_errhp, 3, (dvoid *)tid,
(sb4)tidlen,

                 SQLT_AFC, (dvoid *)0, (ub2 *)0, (ub2 *)0, (ub4)0,

(ub4 *)0,
OCI_DEFAULT);

    OCIBindByPos(oci_stmhp, &bnd4p, oci_errhp, 4, (dvoid *)dir,
(sb4)dirlen,
                 SQLT_AFC, (dvoid *)0, (ub2 *)0, (ub2 *)0, (ub4)0,

(ub4 *)0,
OCI_DEFAULT);

t), OCIBindByPos(oci_stmhp, &bnd5p, oci_errhp, 5, (dvoid *)&blen,
(sb4)sizeof(in
                 SQLT_INT, (dvoid *)0, (ub2 *)0, (ub2 *)0, (ub4)0,

(ub4 *)0,
OCI_DEFAULT);

    OCIBindByPos(oci_stmhp, &bnd6p, oci_errhp, 6, (dvoid *)buff,
(sword)len,
                 SQLT_AFC, (dvoid *)0, (ub2 *)0, (ub2 *)0, (ub4)0,

(ub4 *)0,
OCI_DEFAULT);

    status = OCIStmtExecute(oci_svchp, oci_stmhp, oci_errhp, (ub4)1,
(ub4)0,

                            (CONST OCISnapshot *)NULL, (OCISnapshot
*)NULL,
                            OCI_DEFAULT);

Regards,

Jason.

Frank van Bortel <fvanbortel_at_netscape.net> wrote in message news:<cn7ed3$bea$3_at_news4.zwoll1.ov.home.nl>...

> Jason Liang wrote:
> 
> At least state the version of Oracle (3 digits, 5 if possible),
> and the exact error code (e.g. ORA-01017)
Received on Mon Nov 15 2004 - 06:05:25 CET

Original text of this message