Delphi - how to make a program multi-user

Posted on 2006-05-23
Medium Priority
Last Modified: 2010-04-05
Hi, Experts,

I've been given some Delhi 5 code that needs to be made lightly multi-user. So rather than one person inputing data maybe three could.
We are using the BDE with Paradox tables.

Could someone point me in the direction of the calls and approach to lock/query/unlock and backoff with this combination in Delphi?

With thanks,

Question by:edhasted
  • 4
  • 3
LVL 31

Assisted Solution

moorhouselondon earned 600 total points
ID: 16746562
From: http://info.borland.com/devsupport/bde/bdeapiex/

# DbiAcqPersistTableLock: Acquires an exclusive persistent lock on the table preventing other users from using the table or creating a table of the same name.
# DbiAcqTableLock: Acquires a table-level lock on the table associated with the given cursor.
# DbiGetRecord: Record positioning functions have a lock parameter.
# DbiIsRecordLocked: Checks the lock status of the current record.
# DbiIsTableLocked: Returns the number of locks of a specified type acquired on the table associated with the given session.
# DbiIsTableShared: Determines whether the table is physically shared or not.
# DbiOpenLockList: Creates an in-memory table containing a list of locks acquired on the table.
# DbiOpenUserList: Creates an in-memory table containing a list of users sharing the same network file.
# DbiRelPersistTableLock: Releases the persistent table lock on the specified table.
# DbiRelRecordLock: Releases the record lock on either the current record of the cursor or only the locks acquired in the current session.
# DbiRelTableLock: Releases table locks of the specified type associated with the current session (the session in which the cursor was created).
# DbiSetLockRetry: Sets the table and record lock retry time for the current session.
LVL 31

Expert Comment

ID: 16746596
With Ttable, there is


Author Comment

ID: 16748898
Guess what I'll be trying out today...
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 31

Expert Comment

ID: 16748962
Make sure that inserting records near simultaneously is handled correctly - are you generating sequential ID numbers, or are you using Paradox autoincrement field?  (Autoincrement is probably more reliable, but cannot be controlled).  Don't forget that the NETDIR setting in the BDE needs to be setup too.  Good luck.

Author Comment

ID: 16749057
I always have an auto-increment field in any table :-). The last time I did any MU coding was in the early editions of Paradox - many thanks for all your advice - here goes...

LVL 22

Accepted Solution

Mohammed Nasman earned 150 total points
ID: 16749289
read this article

Paradox: A Cheap Alternative to Client/Server?

Author Comment

ID: 16751480
mnasman - that's a salutary article which was a useful reminder - thanks.

With MoorHouseLondon's comments most of the BDE help examples seem to be based around cursor positions. All very useful if you're looking at a DBGrid.

I have a form of data filled in and I want to be able to lock the file, insert and unlock (having tested it first).
Or when I am working with known record numbers lock that record number and then unlock it.

Are there any examples which are not cursor dependent?

Many thanks,


Author Comment

ID: 16759367
moorhouselondon and msasman,

thank you for your prompt and useful support. In reading your replies I think the real issue was that I had not provided adequate information when forming my question, so expect some more explicit follow ups.

With many thanks for your help,



Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Integration Management Part 2
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question