Collection Contents Index SET OPTION statement [ISQL] SETUSER statement pdf/chap9.pdf

Reference Manual
   CHAPTER 9. SQL Statements     

SET SQLCA statement [ESQL]


Function 

To tell the SQL preprocessor to use a SQLCA other than the default global sqlca.

Syntax 

SET SQLCA sqlca

Parameters 

sqlca: identifier or string

Permissions 

None.

Side effects 

None.

See also 

SQLCA management for multi-threaded or reentrant code

Description 

The SET SQLCA statement tells the SQL preprocessor to use a SQLCA other than the default global sqlca. The sqlca must be an identifier or string that is a C language reference to a SQLCA pointer.

The current SQLCA pointer is implicitly passed to the database interface library on every Embedded SQL statement. All Embedded SQL statements that follow this statement in the C source file will use the new SQLCA.

This statement is necessary only when you are writing code that is reentrant (see SQLCA management for multi-threaded or reentrant code). The sqlca should reference a local variable. Any global or module static variable is subject to being modified by another thread.

Standards and compatibility 

Example 


Collection Contents Index SET OPTION statement [ISQL] SETUSER statement pdf/chap9.pdf