Link to home
Start Free TrialLog in
Avatar of edhasted
edhastedFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Delphi - how to make a program multi-user

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,

Ed
SOLUTION
Avatar of moorhouselondon
moorhouselondon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
With Ttable, there is

tt.locktable(ltWriteLock);
tt.unlocktable(ltWriteLock);
Avatar of edhasted

ASKER

Guess what I'll be trying out today...
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.
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...

Ed
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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,

Ed
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,

Ed