Creating and running an Embedded SQL program

Follow these steps to create and run an Embedded SQL application program:

  1. Write the application program and include the Embedded SQL statements and variable declarations.

  2. Save the application in a file with a .cp extension.

  3. Precompile the application. If there are no severe errors, the precompiler generates a file containing your application program. The file has the same name as the original source file, with a different extension, depending on the requirements of your C compiler. For details, see the Open Client and Open Server Programmer’s Supplement for your platform.

  4. Compile the new source code as you would compile a standard C program.

  5. Link the compiled code with Client-Library.

  6. If you specified the precompiler option to generate stored procedures, load them into Adaptive Server by executing the generated script with isql.

  7. Run the application program as you would any standard C program.