Sqlj Context-Clause; Sqlj Statement-Clause - IBM DB2 Manual

Table of Contents

Advertisement

SQLJ context-clause

A context clause specifies a connection context, an execution context, or both. You
use a connection context to connect to a data source. You use an execution context
to monitor and modify SQL statement execution.
Syntax
[
connection-context
execution-context
connection-context , execution context
Description
connection-context
execution-context
Usage notes
v If you do not specify a connection context in an executable clause, SQLJ uses the
v If you do not specify an execution context, SQLJ obtains the execution context

SQLJ statement-clause

A statement clause contains an SQL statement or a SET TRANSACTION clause.
Syntax
{
SQL-statement
SET-TRANSACTION-clause
Description
SQL-statement
SET-TRANSACTION-clause
288
Application Programming Guide and Reference for Java
Specifies a valid Java identifier that is declared earlier in the SQLJ program.
That identifier must be declared as an instance of the connection context class
that SQLJ generates for a connection declaration clause.
Specifies a valid Java identifier that is declared earlier in the SQLJ program.
That identifier must be declared as an instance of class
sqlj.runtime.ExecutionContext.
default connection context.
from the connection context of the statement.
Related tasks
"Connecting to a data source using SQLJ" on page 103
"Controlling the execution of SQL statements in SQLJ" on page 142
Related reference
"SQLJ executable-clause" on page 287
}
You can include SQL statements in Table 80 on page 289 in a statement clause.
Sets the isolation level for SQL statements in the program and the access mode
for the connection. The SET TRANSACTION clause is equivalent to the SET
TRANSACTION statement, which is described in the ANSI/ISO SQL standard
of 1992 and is supported in some implementations of SQL.
]

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents