What is the use of sqlcxt() pro c function?
I am very new to pro c and I don't have any practical experience on developing pro c program. While debu开发者_运维问答gging a program I encountered a function call
sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);
I have searched on google for help on sqlcxt() function but i haven't found any resources. Some blogs have mentioned the problems occured during pre compilation of pro c program but they are of my no use.
sqlcxt() is a non-documented function.
When you write Pro*C, and then run it through the precompiler, the precompiler takes your '.pc' source file, and produces a '.c' file that is suitable for the system's C compiler to compile. But, some of the stuff that gets converted from precompiler code (things like 'EXEC SQL ....' directives, etc) into C code, references undocumented functions.
The idea is that you can just embed SQL expressions into your C code, and Oracle's precompiler will take care of translating those sections of code into C. The sqlcxt() function you found, is one of those undocumented functions.
If you're interested in writing pure C code, and interfacing with Oracle, you should investigate the OCI library. If your intent to to write Pro*C, then you should only be concerned with the '.pc' source file, and the contents of the '.c' file should really be of no concern to you.
Hope that helps.
精彩评论