ElviraC
ElviraC

Reputation: 41

How to ignore "Application collection already exists" error?

How can I ignore the errors below?

create_co - errc=-20104 errm=ORA-20104: create_collection_from_query_b Error:ORA-20101: Application collection exists

create_co - errc=-20104 errm=ORA-20104: create_collection_from_queryb2 Error:ORA-00001: Schending van UNIQUE-beperking (APEX_180200.WWV_FLOW_COLLECTIONS_UK).

This error is confusing for users.

declare
  pl_query                varchar2(4000);
  cl_collectie   constant varchar2(255) := 'MY_COLLECTION';
begin
  --
  if apex_collection.collection_exists( p_collection_name => cl_collectie )
  then
    apex_collection.delete_collection( p_collection_name => cl_collectie );
  end if;
  --
  pl_query := q'[select QUERY]' ;
  --       
  apex_collection.create_collection_from_queryb2( p_collection_name => cl_collectie
                                                , p_query => pl_query );
end;         

We're using Application Express 18.2.0.00.12.

Upvotes: 0

Views: 1759

Answers (1)

mohamad subhi bouchi
mohamad subhi bouchi

Reputation: 190

if you run the dynamic action for example on button click then you have to disable the button until the dynamic action is finished. generally you need to find a way to prevent your users from running the dynamic action a second time if the first time isn't finished yet.

Upvotes: 1

Related Questions