How to: |
You can issue DBMS commands directly (SQL Passthru) from a Maintain procedure using the SYS_MGR.ENGINE command.
Note: Problems with direct commands are not reported in FOCERROR. You will need to use DBMS_ERRORCODE to determine the success or failure of these commands.
The syntax for the SYS_MGR.ENGINE command is
SYS_MGR.ENGINE("enginename", "command");
where:
Is the name of the RDBMS to which you are passing the command. For a complete list of the possible values, see the appropriate adapter manual.
Is any valid SQL command, including CREATE, DROP, and INSERT.
The following command drops the table NYACCTS. The error code is saved in a variable named rc.
Compute rc/i8; rc = sys_mgr.engine("SQLMSS", "DROP TABLE NYACCTS"); Type "Return Code=<<rc DBMS Err=<<SYS_MGR.DBMS_ERRORCODE" ;
Information Builders |