Built-in Alert in 6i [message #139423] |
Tue, 27 September 2005 23:46  |
vsharmac
Messages: 16 Registered: July 2005
|
Junior Member |
|
|
Hi,
Can someone tell me if there is any way i could modify the Built-in Alert message. If Yes then how?
For Example: When 2 users are trying to modify the same record at the same
time then this error message is displayed:
"FRM-40501: ORACLE error:unable to reserve record for update or delete."
Just before this error message is shown, there is a built in alert which says
"Could not reserve record(2tries). Keep trying"
I want to modify this alert so that it is more user friendly in forms. Is there any way i could do so. Iam working on database 9i and forms 6i
Pliz do reply,
Thanks
vsharma
|
|
|
|
Re: Built-in Alert in 6i [message #139425 is a reply to message #139423] |
Tue, 27 September 2005 23:57   |
Kavitha Suresh
Messages: 22 Registered: September 2005
|
Junior Member |
|
|
FIND_ALERT ( alert_name VARCHAR2); - Returns Alert_id
SET_ALERT_BUTTON_PROPERTY
(alert_id ALERT ,
button NUMBER ,
property VARCHAR2 ,
value VARCHAR2 );
SET_ALERT_BUTTON_PROPERTY
(alert_name VARCHAR2,
button NUMBER ,
property VARCHAR2 ,
value VARCHAR2);
May be these will help
|
|
|
Re: Built-in Alert in 6i [message #139472 is a reply to message #139425] |
Wed, 28 September 2005 03:42   |
vsharmac
Messages: 16 Registered: July 2005
|
Junior Member |
|
|
hi,
The thing that i don't know the name or ID of this Alert.
This is a system generated Alert.
This Alert pops up when more than one user is modifying the record.If suppose somehow i am able to find the name of this alert then i can get the Alert_ID.
After this alert i.e when you press the "NO" on the Alert then
"FRM-40501: ORACLE error:unable to reserve record for update or delete."
I don't want to change the error message but the Alert i.e
"Could not reserve record(2tries). Keep trying" (remember this Alert comes before the error message).
Hope it makes sense
vsharma
|
|
|
Re: Built-in Alert in 6i [message #139481 is a reply to message #139472] |
Wed, 28 September 2005 04:20  |
vsharmac
Messages: 16 Registered: July 2005
|
Junior Member |
|
|
Hi,
Thanks everyone for your response.
I got my answer from one of the forums
Well the code is something like this.
Have to write a ON_LOCK trigger:
Declare
is_locked boolean := false;
dummy VARCHAR2 (2);
Begin
Begin
Select null
INTO dummy
from mytable
where rowid = :myblock.rowid
for update nowait;
exception
when Others then
If sqlcode = -00054 Then
is_locked := True;
End If;
end;
IF is_locked then
Showmessage ('Another user is updating this record. Try again later.');
raise form_trigger_failure;
Else
LOCK_RECORD;
If Not Form_success Then
RAISE form_trigger_failure;
End If;
End if;
End; Message was edited by:Denis Demers
Code reformatted by David
Regrds
vsharma
[Updated on: Wed, 28 September 2005 18:34] by Moderator Report message to a moderator
|
|
|