3. Programming Ingres DTP Applications : How You Create an Ingres DTP Application : Transaction Context Restrictions
 
Share this page                  
Transaction Context Restrictions
Your application must not issue the following statements in an Ingres multistatement transaction:
set session authorization
enable/disable security_audit
set lockmode
set [no]logging
set session with on_error
However, when your application issues these statements, they must be issued with an XA transaction, demarcated as required by your TP vendor software. To determine whether your application is in a transaction, issue the following Ingres SQL statement:
inquire_sql(transaction)
Example: inquire_sql(transaction) statement
begin_xa_transaction();
exec sql inquire_sql (:trxflag = transaction);
if trxflag = 0
{
exec sql set lockmode...
exec sql set session with on_error...
}
...
For details about inquire_sql, see the SQL Reference Guide.