Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQLCA.sqlcode values/meaning Cross-Reference in Pro*C

Re: SQLCA.sqlcode values/meaning Cross-Reference in Pro*C

From: Tommy Wareing <p0070621_at_brookes.ac.uk>
Date: Thu, 16 Jul 1998 09:05:40 GMT
Message-ID: <35adc18f.1297591708@news.brookes.ac.uk>


On Wed, 15 Jul 1998 12:01:06 -0400, "Ramdrive" <SPAM_ME_NOTbob_kuhar_at_ccmail.sgo.sony.com> wrote:

> "Every executable SQL statement reutrns
>a status code in the SQLCA variable sqlcode, which you can check implicitly
>with WHENEVER SQLERROR or explicitly with your own C code."  At no point
>does it go on to say if I wish to explicitly check it, where I look to find
>out what the values mean.

It is either set to 0 (for everything ok), or it's set to the error code returned:
eg
#define NO_DATA_FOUND 1403
#define DUP_VAL_ON_INDEX -1
#define TIMEOUT_ON_RESOURCE -51
#define INVALID_CURSOR -1001
#define NULL_PASSWORD -1005
#define NOT_LOGGED_ON -1012
#define LOGIN_DENIED -1017
#define TOO_MANY_ROWS -1427
#define ZERO_DIVIDE -1476
#define INVALID_NUMBER -1722
#define STORAGE_ERROR -6500
#define PROGRAM_ERROR -6501
#define VALUE_ERROR -6502
#define CURSOR_ALREADY_OPEN -6511

note that the NO_DATA_FOUND is dependant on the exact options that are supplied to the pre-compiler (ANSI mode produces +100, I think)

--
Tommy Wareing
MIS Group
Learning Resources
Oxford Brookes University
01865 483389 Received on Thu Jul 16 1998 - 04:05:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US