Embedded SQL in C/C++

Start off with a good overview of Pro*C Embedded SQL.

Steps to your first Embedded C program:

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