Home » Developer & Programmer » Forms » How to solve system hang when we make SQL statement on a Locked Record in Forms?
How to solve system hang when we make SQL statement on a Locked Record in Forms? [message #79028] Mon, 15 April 2002 20:59 Go to next message
R Saravanan
Messages: 7
Registered: March 2002
Junior Member
Hi
How to avoid system hang when I make DELETE SQL statement on a particular record in Forms Screen which is in update mode in another screen running in another system.
I have no problem when I make UPDATE SQL statement for the above condition.Because I will get Forms default message - 'Could not reserve record[[2 tries]]. Keep trying?'
Kindly hele me to solve the above problem. If you know Error code for this pls let me know.

Regards
R Saravanan
Re: How to solve system hang when we make SQL statement on a Locked Record in Forms? [message #79035 is a reply to message #79028] Tue, 16 April 2002 09:21 Go to previous message
Smitha
Messages: 17
Registered: June 2001
Junior Member
What you can do is, before going to edit mode in your form (update,delete etc), reserve the records displayed by selecting the records with
FOR UPDATE OF .... NOWAIT
...for a single record block this will be a simple query. But for a multi record block you'll need a cursor.
In the exception handler
EXCEPTION WHEN OTHERS THEN
if (sqlcode in (54,-54)) then
x := show_alert('record_locked');
raise form_trigger_failure;
else
MESSAGE(SUBSTR(SQLERRM,1,100));
end if;
END;

You'll have to do it in each and every form so that they basically lock the record and will not allow other forms to access these records in EDIT mode. They can still view it in View Mode
Hope this helps,
Smitha
Previous Topic: prob in record group poplist select
Next Topic: how can i send data directly to printer (LPT1) ?
Goto Forum:
  


Current Time: Fri Aug 14 09:55:53 CDT 2020