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

Home -> Community -> Usenet -> c.d.o.tools -> Re: PROC C/C++ Get Last SQL Statement

Re: PROC C/C++ Get Last SQL Statement

From: Jim Harrison <jim_at_colway.freeserve.co.uk>
Date: 2000/04/29
Message-ID: <8ee3s9$59e$1@newsg2.svr.pol.co.uk>#1/1

Johan,

I always trap errors individually in Pro*C programs by performing a switch on the sqlcode (rather than use WHENEVER clause). This gives me far more control over error trapping, but does increase the size of the source code (but lets me decide exactly what is an error - multiple rows ok etc.). In this way, I can supply a list of the bind variables and their contents to my error handler. Alternatively (less preferred), you could define a global variable which holds the contents of all bind variables which could be used in your error handling routine. Assign these values BEFORE you make your SQL call.

--
Jim Harrison
Colway Software and Design
www.colway.freeserve.co.uk
Received on Sat Apr 29 2000 - 00:00:00 CDT

Original text of this message

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