Processing Embedded SQL Statements

Embedded SQL fully supports all Transact-SQL extensions, including stored procedures, local variables, and control-of-flow language. Due to syntax conflicts with Embedded SQL reserved keywords and because static Embedded SQL statements are compiled into stored procedures by the precompiler, minor restrictions apply to how Transact-SQL extensions are implemented. The restrictions are as follows:

Note

If Microsoft SQL Server returns an error during compilation, the SQL Server error code appears in the precompiler error message as a negative number. For example:


SQL Syntax Error -SQLCODE = -207

For a list of messages that are returned by Embedded SQL, see Appendix E, "Messages."

For information about restrictions that relate to other Embedded SQL statements, see Chapter 3, "Embedded SQL Statements."