In an Oracle Reports application, you can have several connections to one or more databases at the same time. However, there is always one primary database connection, which we refer to as the primary connection.
Handles are used to reference the data source connections in your application.
When you open connections to the primary database or to other databases, connection
handles of type EXEC_SQL.CONNTYPE
are created and used to reference
the connections. Each connection handle refers to one database connection.
When you open a cursor on a connection handle, cursor handles of type EXEC_SQL.CURSTYPE
are created and used to reference the cursor on the given connection. Each connection
handle can have many cursor handles.
Data can be accessed after a connection and a cursor are opened. If you have
multiple connections simultaneously opened, it is recommended that you explicitly
include the specific handles as arguments in your EXEC_SQL
routines.
If you are only accessing data from the primary connection, then you do not
need to specify the connection in the EXEC_SQL
routines. When no
handle is supplied to the EXEC_SQL
routine, EXEC_SQL.DEFAULT_CONNECTION
is automatically called to obtain the primary connection.
About the EXEC_SQL
built-in package
EXEC_SQL
built-in package
examples
Changing the primary database connection
Copying data between two databases
EXEC_SQL
predefined exceptions
Retrieving result sets from queries or non-Oracle stored procedures
Copyright © 1984, 2005, Oracle. All rights reserved.