Re: Pro*C Help Wanted!

From: David Criswell <dcriswel_at_oracle.uucp>
Date: Fri, 18 Jun 1993 20:57:24 GMT
Message-ID: <1993Jun18.205724.18894_at_oracle.us.oracle.com>


In article <740385705snz_at_hoxton.demon.co.uk> paul_at_hoxton.demo.co.uk writes:
>In article <bui.739637271_at_honte> bui_at_panda.uleth.ca writes:
>
>>
>>Hi everyone:
>>
>>After precompiling a Pro*C program (PROG.PC), a C program (PROG.C) is created.
>>In this C program, I see several symbols (subroutines) SQLAD2,SQLBS2,SQLCOM,
>>SQLEXE,SQLFCH,SQLLO2,SQLOPN,SQLOSQ,SQLSCA,SQLSCC,SQLTLF which I do not their
>>exact meanings and functions.
>>
>>Could anyone tell me where I can find the information on these symbols. May
>>I call these subroutines directly in my C program? If yes, to which library
>>should I "link", without "lnproc"?
>>
>>Thank you very much.
>>

 [sig deleted]
>
>Oracle do not provide information on these routines, as far as I know. Of
>course you could call them directly. But you might find it easier to use
>OCI (the Oracle Call Interface). Documented by Oracle complete with
>examples. But you have to worry about memory alocation etc.
>--
>
[sig deleted]

I should have posted rather than emailed the response to this. What Paul said is correct - if you need a direct call interface, OCI is the way to go. It's well documented and your code will likely work with the next release. Direct calls to sqllib, on the other hand, are subject to change. There is, of course, no way for me to stop you from doing it, but I think you'd be doing yourself a disservice. Of the calls that bui_at_panda listed, only two are currently ejected by Pro*C 1.4, the rest are only ejected by Pro*C 1.3. Note that these calls are still there (i.e. you _could_ precompile with 1.3 and link with sqllib 1.4) for upward compatibility, but they're not guaranteed to be there in the future. This caveat does not necessarily apply to the sqllib calls that are documented, specifically those which pertain to Dynamic SQL.

Dave Criswell
Oracle Corporation
Desktop Products

Disclaimer: None of this represents my employer's position, it's just my professional opinion. Received on Fri Jun 18 1993 - 22:57:24 CEST

Original text of this message