ODBC Server Reference Manual

Using Pass-Through Mode
HP NonStop ODBC Server Reference Manual429151-002
6-16
Creating or Altering Tables
To make the new catalog available through the NonStop ODBC Server, customize it
using the USERCAT INSTALL statement:
select "tdm: util usercat install \test01.$users.addres"
Creating or Altering Tables
The following examples show how to use pass-through mode to create or alter tables.
Creating a Nonaudited Table
All tables created with the SQL statement CREATE TABLE are audited by TMF. You
can create a nonaudited table, however, by creating the table in pass-through mode:
select "tdm: sql create table $vol3.saletabs.customer
(custnum numeric (4) unsigned no default,
custname character (25) no default,
city character (14) no default)
catalog $vol3.sales
no audit"
After creating a table in pass-through mode, you can update the mapping tables using
the REFRESH statement:
select "tdm: util usercat refresh $vol3.sales"
Creating a Table With a Primary Key
When you create a table with the SQL statement CREATE TABLE, you cannot specify
a primary key. You can specify a primary key, however, by creating the table in
pass-through mode:
select "tdm: sql create table $vol3.saletabs.customer
(custnum numeric (4) unsigned no default,
custname character (25) no default,
city character (14) default 'San Jose',
primary key custnum)
catalog $vol3.sales
organization key sequenced"
After creating a table in pass-through mode, you can update the mapping tables using
the REFRESH statement:
select "tdm: util usercat refresh $vol3.sales"
Note. If you create a nonaudited table in pass-through mode, any DML operation you perform
on that table must be done in pass-through mode because the NonStop ODBC Server starts a
transaction for every SQL statement executed.