Condition: WinXP; VC 6, installed in C: / Program Files / Microsoft Visual Studio / VC98; Oracle 9 is installed in E: / Oracle / ORA90; Steps: 1, the DOS window Set environment variable, precompiled orract about Pro * C example 2, set the VC environment 3, compile the run C program. Specific description: 1. Operation -> cmd Entering Console CD C: / Program Files / Microsoft Visual Studio / VC98 / BIN VCVARS32.BAT CD E: / ORACLE / ORA90 / PRECOMP / DEMO / PROC Modifier for Exec SQL Connect: username Identified by: password using: dbname; Don't forget to add VARCHAR DBNAME [20] declaration and copy Oracle Service Name to the DecLare Section section. PCMake Sample / Sample Generates Sample / Sample.c 2, to E: / ORACLE / ORA90 / Precomp / Demo / Proc / Sample Double-click Sample.dsp Sample Example Project to open. Menu: Project -> Settings -> Tab Link Add to ORASQL9.lib menu in object / library module and Project Options: Tools -> Select -> Directory TAB page Display Directory has four Drop Down: (1) Excecutable files; (2 ) include files; (3) library files; (4) Source Files. (1) Join E: / Oracle / ORA90 / BIN (2) Add E: / ORACLE / ORA90 / PRECOMP / PUBLIC (3) Add E: / Oracle / ORA90 / PRECOMP / LIB / MSVC
4. If the compilation run is smooth, the results are shown. Conclusion: Follow the Pro * C syntax to make a .pc file, use the Oracle's own tool to generate the .c file call the OCI interface, compile the C program. About Pro * C Syntax http://www.oradb.net/book.htm has this Oracle Proc programming.