Embedded SQL for C Syntax Conventions

ESQL/C syntax combines SQL-92 standard Embedded SQL syntax and most of the Transact-SQL syntax. ESQL/C statements work somewhat differently from, or are in addition to, standard Transact-SQL statements.

Naming Conventions

ESQL/C keywords and statements in your programs are not case-sensitive. For example, the following ESQL/C statement fragments are equivalent:

EXEC SQL CONNECT TO

exec sql connect to

  

However, ESQL/C cursors, prepared statements, and connection names are case-sensitive. The same case must be used to declare and use these names. For example, the following fragments declare two different cursors:

DECLARE CUR_NAME CURSOR

DECLARE cur_name CURSOR

  

The sort order of the Microsoft® SQL Server™ installation to which you are connecting determines whether other words are case-sensitive. Note that hyphens (-) are not permitted in Transact-SQL identifiers, such as table and column names.


Note The Transact-SQL keyword null should not be uppercase in ESQL/C programs to avoid conflict with the C keyword NULL. Also, the ESQL/C keyword delete and the Transact-SQL keyword in should not be uppercase in applications for 32-bit Microsoft Windows® to avoid conflict with 32-bit Windows-defined constants in Windows.h.


  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.