Getting exclusive acces to a Paradox table
I asked this question a couple of days ago, but didn't get an answer. So
I'm trying again in the hope that it was overlooked the first time.
I am doing an application in D1, where the user can create new fields (and
tables). I do it by creating a new table (tblNew) with the same table
structure as the original (tblOriginal) plus the new field, then I transfer
the data via a TBatchMove, delete tblOriginal and rename tblNew. To
accomplish this I set
tblOriginal.Exclusive := true;
So I get an exception if someone else is using the table, when I call Open
for tblOriginal. This works fine, as long as it is another program that
uses the table, I get my exception, but if my own program is using the
table, I don't get an exception until I try to delete the table, which is
very much too late.
Because of the number of tables that the user can create, I would prefer
not to have to create a list of booleans, one for every table, to keep
track of which table have been opened by my own program. So is there
another way to check if I get my Exclusive access at the time I call
tblOriginal.Open?
--
CUL8R dude! \|/
@ @
Jens +-----------------------oOO-(_)-OOo-----------------------+
| Internet jb...@image.dk CompuServe 100437,2475 |
| FidoNet 2:235/142 VirNet 9:451/238 |
| OS2Net 81:445/49 Fax +45 - 3537 - 7006 |
+---------------------------------------------------------+