If you change the primary connection after you have called EXEC_SQL.DEFAULT_CONNECTION
,
the next EXEC_SQL.DEFAULT_CONNECTION
call continues to return the
handle from the cache; it does not automatically return a handle to the new
primary connection.
To make sure you have the correct handle, always use EXEC_SQL.CLOSE_CONNECTION
(without arguments) before you change the primary connection. This allows EXEC_SQL
to free up the memory resources allocated to the previous connection, without
actually closing it.
About the EXEC_SQL built-in package
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.