sqlcxt() pro c 函数有什么用?
我对 pro c 很陌生,没有任何开发 pro c 程序的实践经验。在调试程序时,我遇到了一个函数调用,
sqlcxt((void **)0, &sqlctx, &sqlstm, &sqlfpn);
我在谷歌上搜索了有关 sqlcxt() 函数的帮助,但我没有找到任何资源。 有些博客提到了pro c程序预编译时出现的问题,但对我没有用。
I am very new to pro c and I don't have any practical experience on developing pro c program. While debugging 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
sqlcxt() 是一个未记录的函数。
当您编写 Pro*C,然后通过预编译器运行它时,预编译器会获取“.pc”源文件,并生成适合系统 C 编译器编译的“.c”文件。但是,一些从预编译器代码(例如“EXEC SQL ....”指令等)转换为 C 代码的内容引用了未记录的函数。
这个想法是,您可以将 SQL 表达式嵌入到您的 C 代码中,Oracle 的预编译器将负责将这些代码部分翻译成 C。您找到的 sqlcxt() 函数是那些未记录的函数之一。
如果您有兴趣编写纯 C 代码并与 Oracle 交互,您应该研究 OCI 库。如果您打算编写 Pro*C,那么您应该只关心“.pc”源文件,而“.c”文件的内容实际上与您无关。
希望有帮助。
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.