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
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.
execution-context
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.
Usage notes
v If you do not specify a connection context in an executable clause, SQLJ uses the
default connection context.
v If you do not specify an execution context, SQLJ obtains the execution 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
SQLJ statement-clause
A statement clause contains an SQL statement or a SET TRANSACTION clause.
Syntax
{ SQL-statement }
SET-TRANSACTION-clause
Description
SQL-statement
You can include SQL statements in Table 80 on page 289 in a statement clause.
SET-TRANSACTION-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.
288 Application Programming Guide and Reference for Java
™