ODBC Server Reference Manual

Using Pass-Through Mode
HP NonStop ODBC Server Reference Manual429151-002
6-15
Examples of Using Pass-Through Mode
EXECUTE Statement
When used through the NonStop ODBC Server, the implementation of the EXECUTE
statement differs from the NonStop SQL implementation in the following ways:
Named parameters are not allowed.
You must use the SQLCI version of the statement (as opposed to the
programmatic SQL version).
The following considerations apply to using EXECUTE in both NonStop SQL/MP and
the NonStop ODBC Server:
When a transaction is in progress, you cannot execute a prepared DDL statement
(except UPDATE STATISTICS) that operates on a nonaudited table or index.
You must specify a value in the USING clause for every unnamed parameter in the
prepared statement.
Examples of Using Pass-Through Mode
This subsection contains examples of executing NonStop SQL/MP statements in
pass-through mode. The examples show how to create or alter catalogs, tables, views,
and indexes. There are also some examples of selecting and locking data and using
PREPARE, EXECUTE, and RELEASE Statements.
The examples in this subsection are all based on the following assumptions:
You are using pass-through mode to do operations on customized catalogs.
You want objects available through the NonStop ODBC Server after creating or
altering them in pass-through mode.
If you are using pass-through mode to do operations on catalogs that are not
customized, you can ignore the information about updating the mapping tables.
Creating or Altering Catalogs
The following examples show how to use pass-through mode to create or alter
catalogs.
Specifying the Security When Creating a Catalog
When you create a catalog using the NonStop ODBC Server, you can use the
Transact-SQL statement CREATE DATABASE. You cannot specify file-system security
with this statement. You can specify the security, however, by creating the catalog in
pass-through mode:
select "tdm: sql create catalog
\test01.$users.addres
secure 'nunu' "