Re: Need help on inserting values into table in Forms
Date: Sun, 25 Apr 1999 13:05:00 +0100
Message-ID: <UhtHaAAsTwI3EwFr_at_ahardy.demon.co.uk>
In article <7ftche$npg$1_at_nnrp1.dejanews.com>, celia_xi_at_my-dejanews.com
writes
>Hi, all,
>
>In a trigger I wrote the following codes for retrieving values of elements of
>a list:
>
> list_count:=GET_LIST_ELEMENT_COUNT(list_id);
> FOR i IN 1.. list_count LOOP
> current_value:=GET_LIST_ELEMENT_VALUE(list_id, i);
> INSERT INTO tab1 VALUES (current_value);
> END LOOP;
> COMMIT;
>
>When I run the forms, I got an error:'FRM_40401 NO CHANGE TO SAVE'.
>I also try to use FORMS_DDL, 'FORMS_DDL('INSERT INTO tab1 VALUES
>(current_value')', another error occurs: 'FRM_40508 UNABLE TO INSERT RECORD'.
>
>Could anybody point me out why i can't insert values into table1?
>Any reply will be appreciated.
Because 'FORMS' isn't doing the inserting, it doesn't 'see' that there are any changes to be made - none of the blocks that it is in charge of have changed.
You need to suppress the message/error by altering the :system.message_level to around 10 (?) or so before you do the commit and then put it back down to the previous level afterwards.
Works fine for me.
Andy
>
>Mike
>fding_at_idirect.com
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
-- Andy Hardy. PGP key available on request ===============================================================Received on Sun Apr 25 1999 - 14:05:00 CEST