Home » Developer & Programmer » Forms » record locked (topics merged) (oracle forms 6i)
record locked (topics merged) [message #678571] Mon, 16 December 2019 07:36 Go to next message
Boumati
Messages: 21
Registered: November 2019
Junior Member
Hi,

Please, is there someone who can help me know if a record is locked in oracle/forms 6i.

I used the lock_record instruction and I want to know on the other hand how to know if the record is locked .

like this exemple :

if "record" is locked then ......


thank you a lot.
lock/unlock record [message #678597 is a reply to message #678571] Wed, 18 December 2019 04:53 Go to previous messageGo to next message
Boumati
Messages: 21
Registered: November 2019
Junior Member
Hi,

Please, is there someone who can help me.
i'm developping an application multi-users with oracle/forms6i.

i used the instruction lock_record and i need to know if a record is locked,
so how can i implement this ?

thank you a lot.
Re: record locked [message #678598 is a reply to message #678571] Wed, 18 December 2019 05:28 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
I would think that if you try to lock it, you will get an appropriate message back if it is locked already.
Re: record locked [message #678599 is a reply to message #678598] Wed, 18 December 2019 07:01 Go to previous messageGo to next message
Boumati
Messages: 21
Registered: November 2019
Junior Member

I found the lock_record instruction and I'm looking for another instruction to test if the record is already locked.
Re: record locked [message #678600 is a reply to message #678599] Wed, 18 December 2019 07:02 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
The way to test if a row is locked is to try to lock it.
Re: record locked [message #678601 is a reply to message #678600] Wed, 18 December 2019 07:13 Go to previous messageGo to next message
Boumati
Messages: 21
Registered: November 2019
Junior Member



i used also

SET_BLOCK_PROPERTY('block1', LOCKING_MODE, IMMEDIATE);
SET_BLOCK_PROPERTY('block1', LOCKING_MODE, DELAYED);

but it's not enough to implement what i want to do.

how can i test if the record is locked that is the question.



Re: record locked [message #678602 is a reply to message #678601] Wed, 18 December 2019 07:14 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Try to lock it. What do you get back?
Re: record locked [message #678603 is a reply to message #678602] Wed, 18 December 2019 08:14 Go to previous messageGo to next message
Boumati
Messages: 21
Registered: November 2019
Junior Member

when i try to lock the record
i receive a message without code telling me that the record is already reserved by an other user.
without error number.

Re: record locked [message #678604 is a reply to message #678603] Wed, 18 December 2019 08:50 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
That means it's locked.
That's how forms tells you it's locked.

Why do you want different behaviour?
And what exact behaviour do you want?
Re: record locked [message #678612 is a reply to message #678604] Thu, 19 December 2019 01:46 Go to previous messageGo to next message
Boumati
Messages: 21
Registered: November 2019
Junior Member

Hi,

I want to capture the error code and do something for competitive users
to make the program more adapted (ergonomic) under multi-users conditions.
Re: record locked [message #678614 is a reply to message #678612] Thu, 19 December 2019 05:23 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
OK, so you now know that a row is already locked by another session. You need to define the "do something for competitive users". What do you want to do next?
Re: record locked [message #678621 is a reply to message #678612] Fri, 20 December 2019 15:09 Go to previous message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Boumati wrote on Thu, 19 December 2019 02:46

Hi,

I want to capture the error code and do something for competitive users
to make the program more adapted (ergonomic) under multi-users conditions.
It is NOT an error, it is just locked. Same thing as "Could not reserve record (#). Keep trying?" It is NOT an error.
I have no idea what the terms competitive and ergonomic mean in this context. They sound funny to me.

[Updated on: Fri, 20 December 2019 15:11]

Report message to a moderator

Previous Topic: FORMS 6i
Next Topic: Looping Problem
Goto Forum:
  


Current Time: Thu Mar 28 15:52:28 CDT 2024