DB Access Module for Oracle OCI User’s Guide : Chapter 2 Technical Information : Open SQL and Oracle OCI
Open SQL and Oracle OCI
The alternative Open SQL interface can be used with Oracle OCI. This section provides some specific details and examples.
Placeholder Syntax
The DB Access Module for Oracle OCI uses positional binding for binding program variables to the Oracle library. When input parameter values are provided through binding for RWDBOSql objects, applications must use proper placeholder syntax in their SQL statements. The proper placeholder syntax for host-variable format is:
 
:<anything>
where anything can be a name or a number. For example, to insert data into a two-column table, named MyTable, through binding, the SQL statement would look like this:
 
insert into myTable values (:col1, :col2)
Placeholder syntax is not a portable feature. Different Access Modules use different placeholder syntax.
Supported Datatypes for Output Binding
In addition to the datatype support listed in “Datatypes” Oracle cursors can be bound using the type RWDBNativeType1. See “Stored Procedures and Open SQL” and “An Open SQL Stored Procedure Example” for examples. For more information on output binding, see “Output Binding of Data.”