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. Allyou 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 forthe existence of a lock once your user lands on a record using the BDE call
DbiIsRecordLocked. Here’s how:
var IsRecordLocked : Boolean;DbiIsRecordLocked(Table1.Handle, IsRecordLocked);if IsRecordLocked then …do some stuff.
DbiIsRecordLocked checks for the existence of a record lock, then fills theBoolean input value with appropriate value.