ODBC Server Reference Manual

Using Pass-Through Mode
HP NonStop ODBC Server Reference Manual429151-002
6-7
Transactions and Pass-Through Mode
Examples
The following pass-through statement creates a key-sequenced table:
select "tdm: sql create table $vol3.prsntabs.customer
(custnum numeric (4) unsigned no default,
custname character (25) no default,
city character (14) no default,
primary key custnum)
catalog $vol3.persnl
organization key sequenced"
select "tdm: util usercat refresh $vol3.persnl"
To make the new table available through the NonStop ODBC Server, refresh the
NonStop ODBC Server mapping tables using the following catalog utility statement:
select "tdm: util usercat refresh $vol3.persnl"
For more examples, see Examples of Using Pass-Through Mode on page 6-15.
Transactions and Pass-Through Mode
When used inside a transaction, using pass-through statements differs from using
standard statements in the following ways:
Multiple DDL statements are allowed in a batch.
When not using pass-through mode, the NonStop ODBC Server allows only one
DDL statement in a batch.
All statements are allowed in a user-defined transaction.
When not using pass-through mode, the NonStop ODBC Server does not allow
DDL statements in user-defined transactions.
Most pass-through statements do not cause an implicit BEGIN TRANSACTION.
The NonStop ODBC Server does, however, start a transaction if the pass-through
statement is DELETE, EXECUTE, INSERT, SELECT (even if it contains a FOR
BROWSE ACCESS clause), or UPDATE.
When not using pass-through mode, the NonStop ODBC Server starts a
transaction for every SQL statement.
ROLLBACK TRANSACTION has no effect on DCL statements.
Changes made with DCL statements are permanent throughout the user's session.