Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Pro*C/C++, __FILE__ and __LINE__
Hi Alex,
oraca.ora... is made for SQL statement diagnostics. In your code, there is no SQL statement, so oraca-struct is not filled!
Arndt
Alex Vinokur wrote:
> In article <37FDD08D.E0306F37_at_deutsche.post.de>,
> Arndt Binninger <a.binninger2_at_deutsche.post.de> wrote:
> > Hi Alex,
> >
> > try Precompiler-Option: LINES=YES.
> >
> > In my error-code I use:
> >
> > printf("\tin Zeile %d of %.*s.\n\n", oraca.oraslnr,
> > oraca.orasfnm.orasfnml,
> > oraca.orasfnm.orasfnmc);
> >
>
> Thank you very much for your answer.
> Using Precompiler-Option: LINES=YES
> I have got a desirable result
> with __LINE__ and __FILE__.
>
> But I didn't have a desirable result
> with oraca.oraslnr,
> oraca.orasfnm.orasfnml,
> oraca.orasfnm.orasfnmc.
> What is wrong?
>
> Thanks in advance,
> Alex
>
> //#########################################################
> //------------------- Pro*C/C++ code : BEGIN --------------
> #include <stdio.h>
> #include <sqlca.h>
> #include <oraca.h>
> EXEC ORACLE OPTION (ORACA=YES);
> int main()
> {
> printf ("\t%s %d\n", __FILE__, __LINE__); /* ttt.pc, Line#7 */
> printf("\tin Zeile %d of %.*s.\n\n", oraca.oraslnr,
> oraca.orasfnm.orasfnml,
> oraca.orasfnm.orasfnmc);
>
> return 0;
> }
>
> //------------------- Pro*C/C++ code : END ----------------
>
> //#########################################################
> //------------------- Compilation : BEGIN -----------------
>
> proc iname=ttt LINES=YES
>
> Pro*C/C++: Release 8.0.5.0.0 - Production on Sun Oct 10 9:48:35 1999
>
> (c) Copyright 1998 Oracle Corporation. All rights reserved.
>
> System default option values taken from:
> /home/u01/app/oracle/product/8.0.5/precomp/admin/pcscfg.cfg
>
> [snip]
>
> //------------------- Compilation : END -------------------
>
> //#########################################################
> //------------------- Running Results : BEGIN -------------
>
> ttt.pc 7
> in Zeile 0 of .
>
> //------------------- Running Results : END ---------------
>
> //#########################################################
> //------------------- System ------------------------------
>
> === Oracle 8.0.5
> === Pro*C/C++ : Release 8.0.5.0.0
> === SunOS 5.6
>
> //---------------------------------------------------------
>
> //#########################################################
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Oct 11 1999 - 08:01:45 CDT
![]() |
![]() |