Skip to Main Content

APEX

ORA-20104: create_collection_from_query Error

455564Jan 3 2008 — edited Jan 3 2008
I am using a tabular form based on a collection that uses a fairly complicated piece of SQL to populate the collection and can take between 2-10 seconds to fetch the data. I am using a fairly standard piece to code in a process to create my collection as below.

IF APEX_COLLECTION.COLLECTION_EXISTS
(p_collection_name => 'TEAM_RESOURCE' )
THEN
APEX_COLLECTION.DELETE_COLLECTION
(p_collection_name => 'TEAM_RESOURCE' );
END IF;

APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
p_collection_name => 'TEAM_RESOURCE',
p_query => 'SELECT .........' );


However, if the user becomes impatient and starts pressing the button that creates the collection multiple times then I get the following error:

ORA-20104: create_collection_from_query Error:ORA-20101:Application collection exists

Can anyone provide a suggestion as to how I can avoid this error being raised?

Thanks in anticipation

Jon
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 31 2008
Added on Jan 3 2008
1 comment
7,442 views