Embedded SQL programming operates as follows:
1. From the command prompt, the name of the Embedded SQL source file and the appropriate build parameters are submitted to sqlprep, which is the Embedded SQL precompiler. The precompiler parses the submitted file, finds the Embedded SQL statements that are included in the code, and processes the statements.
2. The precompiler produces a C source code file with the Embedded SQL statements removed and, if appropriate, a bind file. The Embedded SQL statements are replaced by calls to the run-time library. The run-time library calls DB-Library to access SQL Servers across a network.
During this step, you can specify that stored procedures be automatically created and stored on a specific SQL Server or saved in a bind file. Bind files are Transact-SQL scripts that have a .BND extension.
3. The C source code file is compiled with a supported C compiler to produce an object code file.
4. The object code file and library routines are linked together with a supported linker to produce an executable file.
For more information about building an Embedded SQL application, see Chapter 4, "Building Applications."