frm-40737 illegal restricted procedure first_record next_record [message #401979] |
Thu, 07 May 2009 03:36 |
TonyJaa
Messages: 50 Registered: May 2009
|
Member |
|
|
Hello,
I have this problem :
In a block, when i insert a new record i have to check this record versus others records of the block. So i make a FIRST_RECORD;
LOOP
/*check*/
/*if ok nothing*/
/*if ko ask the user continue or cancel*/
/*continue will update the current record */
/*cancel will delete the newly inserted record */
NEXT_RECORD;
IF LAST_RECORD THEN EXIT; END IF;
END LOOP;
I have to make this action in the record level because i ask a action by the user on the record inserted.
But i can't use FIRST_RECORD; NEXT_RECORD; in any validate trigger. Is there an other way ?
Thanks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: frm-40737 illegal restricted procedure first_record next_record [message #405152 is a reply to message #404506] |
Tue, 26 May 2009 10:55 |
TonyJaa
Messages: 50 Registered: May 2009
|
Member |
|
|
Hello,
I have found a solution without looping or dynamic record group, i would like to thank you all for helping me and of course share the solution with you.
1) instead of using commit; or commit_form; i use post; the data entered in the form are visible in a DB without to be commited. In a when-validate-record i put a timer which do post; --> data of the form and data of the DB are always synchronized.
2) then to validate the data i use sql statement. it tells me if its ok or not.
3) instead of loop each record to find the one i need to change i make a update statement; and a clear_block execute_query to refresh the form.
4) The user commit the data himself.
Is it a good way to validate multi-line block without commit each record ?
Thank
|
|
|