Tabular Form based on a collection ( view )
654241Aug 7 2009 — edited Oct 24 2009Hello,
I made a tabular form based on a view
-----
CREATE VIEW my_view AS SELECT * FROM apex_collections WHERE upper(collection_name) = 'MY_COLLECTION'
-----
On that view I added an instead of trigger for INSERT, UPDATE and DELETE.
When I use normal SQL ( PL/SQL process ) from my page I can without any problem insert or update or delete.
When I used the tabular form, I always get an error 404.
Any idea why this issue?
Tyia,
Arnaud
-----
ps: Trigger Code :
CREATE OR REPLACE
TRIGGER VW_COL_TEST_ARE_BIUDR
INSTEAD OF INSERT OR DELETE OR UPDATE ON VW_COL_TEST_ARE
REFERENCING OLD AS OLD NEW AS NEW
BEGIN
--
DECLARE
--
v_col_name VARCHAR2(100) := 'TEST_ARE';
--
BEGIN
--
IF INSERTING THEN
--
IF NOT APEX_COLLECTION.COLLECTION_EXISTS ( p_collection_name => v_col_name ) THEN
--
APEX_COLLECTION.CREATE_COLLECTION(p_collection_name => v_col_name );
--
END IF;
--
APEX_COLLECTION.ADD_MEMBER(
p_collection_name => v_col_name,
p_c001 => :NEW.C001,
p_c002 => :NEW.C002,
p_c003 => :NEW.C003,
p_c004 => :NEW.C004,
p_c005 => :NEW.C005,
p_c006 => :NEW.C006,
p_c007 => :NEW.C007,
p_c008 => :NEW.C008,
p_c009 => :NEW.C009,
p_c010 => :NEW.C010,
p_c011 => :NEW.C011,
p_c012 => :NEW.C012,
p_c013 => :NEW.C013,
p_c014 => :NEW.C014,
p_c015 => :NEW.C015,
p_c016 => :NEW.C016,
p_c017 => :NEW.C017,
p_c018 => :NEW.C018,
p_c019 => :NEW.C019,
p_c020 => :NEW.C020,
p_c021 => :NEW.C021,
p_c022 => :NEW.C022,
p_c023 => :NEW.C023,
p_c024 => :NEW.C024,
p_c025 => :NEW.C025,
p_c026 => :NEW.C026,
p_c027 => :NEW.C027,
p_c028 => :NEW.C028,
p_c029 => :NEW.C029,
p_c030 => :NEW.C030,
p_c031 => :NEW.C031,
p_c032 => :NEW.C032,
p_c033 => :NEW.C033,
p_c034 => :NEW.C034,
p_c035 => :NEW.C035,
p_c036 => :NEW.C036,
p_c037 => :NEW.C037,
p_c038 => :NEW.C038,
p_c039 => :NEW.C039,
p_c040 => :NEW.C040,
p_c041 => :NEW.C041,
p_c042 => :NEW.C042,
p_c043 => :NEW.C043,
p_c044 => :NEW.C044,
p_c045 => :NEW.C045,
p_c046 => :NEW.C046,
p_c047 => :NEW.C047,
p_c048 => :NEW.C048,
p_c049 => :NEW.C049,
p_c050 => :NEW.C050,
p_clob001 => :NEW.clob001
);
--
ELSIF updating THEN
raise_application_error(-20000,'TEST_ARE Not implemented');
ELSIF deleting THEN
--
APEX_COLLECTION.DELETE_MEMBER(
p_collection_name => v_col_name,
p_seq => :OLD.SEQ_ID);
--
IF APEX_COLLECTION.COLLECTION_MEMBER_COUNT ( p_collection_name => v_col_name ) = 0 THEN
--
APEX_COLLECTION.DELETE_COLLECTION ( p_collection_name => v_col_name );
--
END IF;
--
END IF;
--
END;
--
END;
Edited by: Arnaud Reper on Aug 7, 2009 11:37 AM
Edited by: Arnaud Reper on Aug 7, 2009 11:40 AM