Board index » delphi » Problem with TTable.LockTable/TTable.UnLockTable

Problem with TTable.LockTable/TTable.UnLockTable

What database are you using?

Bill

--

Bill Todd - TeamB
(TeamB cannot respond to email questions. To contact me
 for any other reason remove nospam from my address.)

 

Re:Problem with TTable.LockTable/TTable.UnLockTable


First, I lock the table for writing, like this:
Station.LockTable(ltWriteLock); So far no problems.
Then, I unlock the table for writing, like this:
Station.UnLockTable(ltWriteLock);
The project raises with the message "Object not locked!" Why?

-Petter-

--
Petter Holmstr?m
E-mail: mailto:petter.holmst...@parnet.fi
Home page: http://www.parnet.fi/~pkh/

Re:Problem with TTable.LockTable/TTable.UnLockTable


Paradox

-Petter-

Quote
Bill Todd wrote:
> What database are you using?

> Bill

> --

> Bill Todd - TeamB
> (TeamB cannot respond to email questions. To contact me
>  for any other reason remove nospam from my address.)

--
Petter Holmstr?m
E-mail: mailto:petter.holmst...@parnet.fi
Home page: http://www.parnet.fi/~pkh/

Re:Problem with TTable.LockTable/TTable.UnLockTable


I have no idea. A single LockTable followed by a matching UnlockTable should
always work with Paradox tables. If the lock fails an exception should be
raised.

Bill

--

Bill Todd - TeamB
(TeamB cannot respond to email questions. To contact me
 for any other reason remove nospam from my address.)

Re:Problem with TTable.LockTable/TTable.UnLockTable


It works now. Since I UnLock/Lock the tables in a for loop, i added a function
that checked if the table was locked. If it was, I called the UnLock. Most
probably I tried to unlock a table that wasn't locked.

-Petter-

Quote
Bill Todd wrote:
> I have no idea. A single LockTable followed by a matching UnlockTable should
> always work with Paradox tables. If the lock fails an exception should be
> raised.

> Bill

> --

> Bill Todd - TeamB
> (TeamB cannot respond to email questions. To contact me
>  for any other reason remove nospam from my address.)

--
Petter Holmstr?m
E-mail: mailto:petter.holmst...@parnet.fi
Home page: http://www.parnet.fi/~pkh/

Other Threads