Comparing the library approach to Embedded SQL

Either an Open Client library application or an Embedded SQL application can be used to send SQL commands to Adaptive Server Enterprise.

Generally, Embedded SQL is a superset of Transact-SQL. An Embedded SQL application includes Embedded SQL commands intermixed with the application’s host language statements. The host language precompiler processes the Embedded SQL commands into calls to Client-Library routines and leaves the existing host-language statements as is. All version 10.0 or later precompilers use a runtime library composed solely of documented Client-Library and CS-Library calls.

In a sense, then, the precompiler transforms an Embedded SQL application into a Client-Library application.

An Open Client library application sends SQL commands through library routines, and does not require a precompiler.

Generally, an Embedded SQL application is easier to write and debug, but a library application can take fuller advantage of the flexibility and power of Open Client routines.