The EDB OCL Connector, version 13.1.4.2, is certified with OTL 4.0. To use OTL-supported data types and for other OTL-specific behavior, define the OTL environment variable (the value isn't important) on the shell before running an OTL-based app. For example, you can export OTL=TRUE for conditional execution of scenarios that are related to OTL.
EDB OCL Connector is certified with the following OTL features:
Connect, disconnect, commit, and roll back using otl_connect.
Constant SQL statements using the static function otl_cursor::direct_exec. (A SQL statement is constant if it doesn't have any bind variables.) It includes most DDL statements like CREATE TABLE and CREATE PROCEDURE/FUNCTION.
SQL statements with bind variable using otl_stream class. It includes most DML statements like SELECT, UPDATE, DELETE, INSERT, and PROCEDURE/FUNCTION calls.
Date/Time data types using otl_datetime.
Raw/Long Raw data types using otl_long_string.
Ref cursors using otl_refcur_stream.
Connect and log in
This example initializes OCL and connects to a database using a tnsnames.ora-based connection string:
CREATE TABLE, INSERT, and SELECT
This example uses otl_cursor::direct_exec to create a table and then insert a row in the table. You can then use otl_stream to retrieve the inserted row.
UPDATE
This example uses bind parameters in an UPDATE statement:
Stored procedure
This example creates a stored procedure using otl_cursor::direct_exec and then calls it using otl_stream:
Function
This example creates a function using otl_cursor::direct_exec and then calls it using otl_stream:
Note
This example is using the emp table in the edb sample database.
REF CURSOR
This example creates a package with a procedure that returns three ref cursors as OUT parameters and then calls it.
Note
This example is using the emp table in the edb sample database.