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 blank 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 Oralce 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.
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");