EXEC_SQL.OPEN_CURSOR
built-in functionThis function creates a new cursor on a specified connection and returns a
cursor handle. When you no longer need the cursor, you must close it explicitly
by using EXEC_SQL.CLOSE_CURSOR
.
FUNCTION EXEC_SQL.OPEN_CURSOR
[connid IN CONNTYPE]
RETURN EXEC_SQL.CURSTYPE;
Parameter |
Description |
|
Is the handle to the connection you want to use. If you
do not specify a connection, |
PROCEDURE getData IS
--
-- a cursorID must be of type EXEC_SQL.CURSTYPE
--
connection_id EXEC_SQL.CONNTYPE;
cursorID EXEC_SQL.CURSTYPE;
...
BEGIN
connection_id := EXEC_SQL.OPEN_CONNECTION('connect_str');
...
-->
-- this cursor is now associated with a particular connection
--
cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
...
END;
About the EXEC_SQL
built-in package
Copyright © 1984, 2005, Oracle. All rights reserved.