I'm trying to get to grips with how to overhaul some Delphi code to become multi-user.
The program has a sequence of forms that need to be posted to a Paradox Table controlled by the BDE.
In essence I want to check if the table is locked and if not lock the table or record and then post and then remove my locks.
The Borland BDE API examples seem to be working with grids and rely on working out where the cursor is.
They don't appear to be appropriate and do I need anything that complex.
I have three issues that I will separate out into distinct EE questions.
How do I see if the table is locked?
If I use the crude code below I can get the BDE intercepting it first telling me that the table is locked by another user.
Also it always gives me the same answer. I am forcing the table into Edit mode to notionally lock it.
function IsLocked(TheDataSet: TDataSet): Boolean;
Result := False;
Result := True;
if Result = True then ShowMessage('Database Locked');
if Result = False then ShowMessage('Database UnLocked');
1. How do I improve the code so it works and
2. Trap the error calls so they are handled more elegantly.