Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[b]Record locking in ObjectPAL[/b]

Status
Not open for further replies.

jartman

Programmer
Oct 16, 2001
34
US
Can anyone explain when and why I would need to explicitly lock records and tables in PAL? I've seen a number of posts here on specific record locking issues, but I don't understand when Paradox does it automatically and when I need to do it. I manage a multiuser inventory application that has absolutely no explicit locks going on. I haven't noticed any problems, but the chances of anyone accessing the same record at the same time is still quite small because of usage patterns. This will probably change soon and I don't want any surprises...
 
I wouldn't change anything unless you see a problem. The default behavior is usually more than adequate.

Mac :)

"There are only 10 kinds of people in this world... those who understand binary and those who don't"

langley_mckelvy@cd4.co.harris.tx.us
 
As Langley stated you don't normally need to worry about record locking unless there is a specific task you need to do that will require it.

In my applications I rarely use it, one place I do use it is I have a table that contains incrementing numbers, ie: invoice numbers, account numbers etc. When my application needs to generate a new invoice number I try and place an explicit lock on the record, if the lock fails because another user is generating an invoice number then my application loops until the lock is successful, then I generate a new number and unlock the record. Explicit locking is a way of checking to see if a record can be modified and then locking it so other users can't access it.

Normally you don't need to worry about surprises, Paradox is very good at handling locking.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top