The SQL Communications Area (SQLCA) is an area of memory that is used for communicating statistics and errors from the application to the database and back to the application. The SQLCA is used as a handle for the application-to-database communication link. It is passed explicitly to all database library functions that communicate with the database. It is implicitly passed in all embedded SQL statements.
UltraLite defines a SQLCA global variable for you in the generated code. The preprocessor generates an external reference for the global SQLCA variable. The external reference is named sqlca and is of type SQLCA. The actual global variable is declared in the import library.
The SQLCA type is defined in the header file %SQLANY16%\SDK\Include\sqlca.h.
After declaring the SQLCA (
EXEC SQL INCLUDE SQLCA;), but before your application can perform any operations on a database, you must initialize the communications area by calling
db_init and passing it the SQLCA:
db_init( &sqlca );
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|