Record locking (Delphi 2 Paradox 5)

Record locking (Delphi 2 Paradox 5)

We are trying to write a multi-user Delphi 2.0 app (with Paradox 5.0 tables), and are looking for a way to determine if a record is locked by another machine before we attempt to modify it. I have tried to use the DbiIsRecordLocked function, to no avail. It always returns false, even if I have called DbiGetRecord or Table.Edit. The BDE knows it’s locked because a subsequent call to DbiGetRecord or edit on that record raises an exception (Record locked by user: username). Is DbiIsRecordLocked supposed to work across a network (netware or NT), and if so, how is it used correctly?

This is one of the “problems” with the Paradox locking scheme. It’s notenough to just be in Edit mode. In order to create a “locked” condition on arecord, you have to physically change it in some way. One way I’ve gottenaround this is to create a dummy field of a single byte that gets changed assoon as a user lands on a record. This puts therecord into a locked state that can then be checked with DBIIsRecordLockedfrom other machines. It’s not the prettiest technique, but it works.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes