Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Relational Databases
Expertise: Beginner
May 9, 1997



Application Security Testing: An Integral Part of DevOps

Database management program for multi-user

I am using Delphi 1.0 and am having a hard time trying to find commands/procedures/modules to lock a record from a Paradox database. What should I do to lock a single record from a database file for exclusive access?

Paradox uses an "implied" locking scheme for locking records. All you need to do is start editing the record and it will be locked. You see, the BDE handles the locking for you. In this case, it's better to check for the existence of a lock once your user lands on a record using the BDE call DbiIsRecordLocked. Here's how:

  IsRecordLocked : Boolean;

DbiIsRecordLocked(Table1.Handle, IsRecordLocked);
if IsRecordLocked then
  ...do some stuff.
DbiIsRecordLocked checks for the existence of a record lock, then fills the Boolean input value with appropriate value.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date