Embedded SQL Applications at Run Time

Embedded SQL for C and SQL Server

Embedded SQL for C and SQL Server

Embedded SQL Applications at Run Time

When you run an Embedded SQL for C (ESQL/C) application, SQL statements are executed as follows:

  1. For every SQL statement, the application calls the appropriate ESQL/C run-time services.

  2. If the SQL statement is static, the run-time services execute the SQL statement or a previously compiled stored procedure with the appropriate input parameters. Executing a stored procedure at run-time depends on your pre-compile options to nsqlprep (that is, /SQLACCESS which creates stored procedures for static SQL statements). If the statement is dynamic, the run-time services issue the SQL statements directly. 

  3. The run-time services use DB-Library calls to send and retrieve data to and from Microsoft® SQL Server™ 2000.

  4. The run-time services insert data into C program host variables (or SQLDA data structures). Status and error information is inserted into the SQLCA data structure.