db_command

Sends a DBMS driver command.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

void db_command(command,spec)
int             command
string          spec

Description

Sends the specified command to the DBMS driver. The command values are defined in the trim.h file. The spec string contains the values appropriate for the command.
command specifies the DBMS driver command.
Cmd Parms DBMS Duration Default Description
0nAllSessionDiffers Set resource timeout to n seconds.
1yes|noSybaseSessionNo Use a single PID within a transaction.
3dbnameSybaseSessionN/A Use database dbname.
4languageOracleSessionSee oparse() or StmtPrepare Set SQL syntax and datatypes.
5yes|noAllSessionno Return raw datetime.
7dtyOracleSession1 Map VORTEX char type to Oracle type dty.
8N/AAllCallN/A Lock VORTEXaccelerator slave on next call.
9yes|noSybaseSessionNo Return single blanbk varchar as blank instead of null.
10yes|noSybaseSessionNo Batch INSERT, UPDATE, and DELETE statements.
11on|offGENESISSessionoff Automatically commit after every SQL statement.
12N/AInformixUntil next useN/A Sets the current connection to dormant.
13N/AOracleCallN/A Returns the address of the LDA on Oracle 7 only.
14valueTRIMrpcCallN/A Cause a raise(value) error condition.
15messageTRIMrpcCallN/A Return the message as an error.
16N/AVORTEXwebdCallN/A Execute a temporary release.
17valueGENESIS/SDMSSessionN/A Call sdms2_initx() using value.
18nGENESISSession2 Set query timeout to n seconds
19nGENESIS/SDMSSession2 Set fetch timeout to n seconds
20yes|noODBCSessionconnection default Use dynamic cursors.
21N/AGENESISSessionN/A Return GENESIS syntax level.
22yes|noAllSessionyes Return ROWID on insert.
23yes|noOracleSessionno Use BLOB/CLOB instead of LONG RAW/LONG.
24yes|noODBCSessionno Use read-only cursors.
25cursor typeODBCSessionSQL_CURSOR_TYPE_DEFAULT Set the ODBC cursor type to one of:
SQL_CURSOR_STATIC
SQL_CURSOR_KEYSET_DRIVER
SQL_CURSOR_DYNAMIC
SQL_CURSOR_FORWARD_ONLY.
26isolation typeODBCSessionN/A Set the ODBC isolation type to one of:
SQL_TXN_READ_UNCOMMITTED
SQL_TXN_READ_COMMITTED
SQL_TXN_REPEATABLE_READ
SQL_TXN_SERIALIZABLE.
27scroll optionOracle
Informix
DB2
AdabasD
ODBC
CursorN/A Set the scrolling direction or position of a scrollable cursor (see VTXOPEN). Scroll options are defined in vortex.h as TDB_SMD_SCROLL_xx.
28N/AAllN/AN/AReturn the hostname of the machine where the DBMS driver is running.
29yes|noAllSessionnoReturn fully qualified column names.
30N/AODBCCursorN/AFree the locks held by the cursor.
31yes|noODBC
SQL Server
SessionnoDescribe W[VAR]CHAR columns as CHAR.
32yes|noODBC
SQL Server
SessionnoForce zero length parameter strings to be bound as NULL.
33yes|noDB2SessionnoProcess stored procedure cursors with EXIO.
spec specifies the command modifiers.

Examples

Notify the DBMS to not return the inserted row's ROWID value.
db_command(db_cmd_return_rowid,"NO");
exec_sql("insert into staff values(:1,:2,:3,:4,:5,:6,:7)",ll);
db_command(db_cmd_return_rowid,"YES");