Embedded SQL in C/C++
Start off with a good
overview
of Pro*C Embedded SQL.
Steps to your first Embedded C program:
- Create a folder called "student" in the root of your H: drive
- Copy the files student.pc and sqlca.h to the folder
- Open Microsoft Visual Studio 2008 IDE.
- Select Visual C++ Development Setting
- Under the File Menu choose New and choose Project
- Choose Win32 Console Application
- Name: "student"
- Location: "H:\"
- Uncheck "Create directory for solution" and click OK
- Click Application Settings
- Turn on "Empty Project" and Click Finish
- Set up the Pro-C++ pre-compiler
- On the Tools menu, choose "External Tools"
- Click Add
- Title: "ProC++"
- Command: "S:\oracle10g\client\bin\proc.exe
- Arguments: "code=cpp student.pc"
- Initial Directory: "H:\student"
- Turn on "Use output window"
- Click OK
- On the "File" menu, choose "Open" .. "File" and find "student.pc" on your H: drive
- On tools menu, choose "ProC++"
- In Solution Explorer, right click "Source Files", Choose "Add" and "Existing Item" and find "student.cpp"
- In Solution Explorer, right click "Source Files", Choose "Add" and "Existing Item" and find "S:\oracle10g\client\precomp\lib\orasql10.lib"
- Choose No on the pop-up window
- Build the Project
- Open your H:\student\debug folder, right-click on the "student.exe" application, choose "Create shortcut"
- Right-click on the shortcut, choose properties
- Enter "S:\oracle10g\client\bin" in the "Start in:" box and click ok
- Double click on the shortcut to run the program
- To make modifications:
- Edit the student.pc file
- Save the changes
- Run ProC++ from the tools menu
- Build the project
- Double click the short-cut to run it