Open SQL Examples
These examples illustrate how an RWDBOSql object can be used to:
*Execute an INSERT statement, An Open SQL Insert Example.
*Execute a SELECT query and retrieve its results, Open SQL Query Examples.
*Execute a stored procedure and process its parameters and result sets, An Open SQL Stored Procedure Example.
All statements are based on an employee table emp. The examples assume an error handler is associated with the connection in use, and don’t check for any errors after calls to the RWDBOSql object.
The structure of the table emp is:
 
empno INT NOT NULL
ename VARCHAR(10) NOT NULL
posn VARCHAR(9) NOT NULL
mgr INT NULL
sal NUMERIC(7,2) NOT NULL
dept INT NOT NULL