Re: Oci error
Date: Tue, 12 Dec 2000 18:06:21 GMT
Message-ID: <915pen$pej$1_at_nnrp1.deja.com>
In article <915ia2$3n5$1_at_mail.mebius.kiev.ua>,
sam_at_mebius-kb.kiev.ua wrote:
> Hi,
>
> Has anybody known the way to determine the position of error in the
string
> of SQL-request via OCI 8i
>
> Thanks for any information.
> --
>
>
Yes. Look in the manuals about sqlca. One of the fields is the character position of the error. It is zero based eg 15 is the 16 character.
in 'Pro*C/C++ Precompiler' manual
"sqlerrd[4]
This component holds an offset that specifies the character position at which a parse error begins in the most recently executed SQL statement. The first character occupies position zero.
Handling Runtime Errors 9-21"
OR more directly:
A-6 Oracle Call Interface Programmer’s Guide
Part IB Appendixes
For each handle type, the attributes which can be read or changed are listed. Each attribute listing includes the following information:
Mode The following modes are possible: READ - the attribute can be read using OCIAttrGet() WRITE - the attribute can be modified using OCIAttrSet() READ/WRITE - the attribute can be read using OCIAttrGet(), andit can be modified using OCIAttrSet().
Error Handle Attributes OCI_ATTR_DML_ROW_OFFSET Mode READ Description Returns the offset (into the DML array) at which the erroroccurred.
Attribute Datatype
ub4 *
A manual is a terrible thing to waste. Read.
-- Michael Krolewski Rosetta Inpharmatics mkrolewski_at_rosetta.org Ususual disclaimers Sent via Deja.com http://www.deja.com/Received on Tue Dec 12 2000 - 19:06:21 CET