Board index » delphi » Error 10249 Lock Time Out

Error 10249 Lock Time Out

Can anyone give me some information on what sort of things cause a lock
timeout in a Paradox database using a Delphi 5 application in a multi-user
environment on a Windows NT server?  It appears that it is the Pdoxusrs.net
file that is locked and causing the error.

I have an application that runs a query against a Paradox table.  Then once
the query is run the application is minimized and placed in the systray.  At
that time I close the query.  The application stays in the tray and every
hour it reruns the query and displays a message if certain criteria are met.
It looks like even though the application closes the query the pdoxusrs.net
file remains open and according to the open file display it has a lock on
it.
--

Regards

Kevin Campbell
TMA Corporation/Bath, ME

 

Re:Error 10249 Lock Time Out


Does the app update any tables? How many users are acessing the database.
Usually a lock timeout occurs if there is a network problem or a lot of
users are trying to place or release locks at the same time. Try using
DbiSetLockRetry (see the BDE API help file) to see the lock retry period to
two seconds or so and see if that helps.

--
Bill Todd (TeamB)
(Questions received via email cannot be answered.)

Re:Error 10249 Lock Time Out


Quote
>Can anyone give me some information on what sort of things cause a lock
>timeout in a Paradox database

Network errors.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:Error 10249 Lock Time Out


I actually have two applications that users run.  One is the app I
specified.  All it does is query one table out of our database to let the
user know how may overdue or new tasks they have.  It is something like the
reminder in Microsoft Money.  It just sits in the systray and periodically
queries the table to see if there are new tasks.  It does not update any
tables at all.  The other application is the main data entry, reporting,
maintenance, lookup application that everyone uses to manage the data.
There are about two hundred users of this system with maybe fifty or so
active at a time.  The funny thing is that this main application has been
running for several years with virtually no lock timeout errors with many
people simultaneously viewing, adding, editing data.  I recently added this
query application and now whenever people are running it we seem to be
getting lock timeouts.  The application closes the underlying table after it
does the query but the Pdoxusrs.net file seems to be held open and locked
(looking at a Novell server connection status display) as long as the
application is running.  This is true if the data entry application is run
also.  If a user is running both at the same time then the connection
display shows two locks in the pdoxusrs.net file.
--

Regards

Kevin Campbell
TMA Corporation/Bath, ME
"Bill Todd (TeamB)" <b...@dbginc.com> wrote in message
news:8l5tk1$7a214@bornews.borland.com...

Quote
> Does the app update any tables? How many users are acessing the database.
> Usually a lock timeout occurs if there is a network problem or a lot of
> users are trying to place or release locks at the same time. Try using
> DbiSetLockRetry (see the BDE API help file) to see the lock retry period
to
> two seconds or so and see if that helps.

> --
> Bill Todd (TeamB)
> (Questions received via email cannot be answered.)

Re:Error 10249 Lock Time Out


The error you are getting has _nothing_ to do woth the PDOXUSRS.NET file.
The problem is a network problem or multiple users trying to place or
release locks on the same table at the same time and one of them gets the
error because the PDOXUSRS.LCK file segment that the user needs to lock is
already locked by someone else. Try using DbiSetLockRetry as I suggested in
my original message. I would strongly suggest you try to eliminate the query
and use SetRange with a TTable instead. With 50 concurrent users you are
getting to the point where you should think about moving to a database
server instead of using Paradox tables.

--
Bill Todd (TeamB)
(Questions received via email cannot be answered.)

Re:Error 10249 Lock Time Out


I can't use a SetRange because the result set is not in a contiguous group
but scattered throughout the table.  The table has more than 200,000 records
and the result set may return 10 to 20 for a given user.  I'll look into the
DbiSetLockRetry and see if that does anything for me.
As I said before the underlying table that the TQuery object queries is
closed after the query is run but the TQuery object stays active and the
PDOXUSRS.NET file stays open for the whole session.

The main application that has been running for years without this problem
opens and keeps open about 50 different tables at a time.  These tables are
all opened for read/write and there are about 50 users running this
application and we've never had a lock timeout.  The only time a users sees
any kind of lock message is if they attempt to edit a record that another
user is already editing.  That's as it should be.
--

Regards

Kevin

"Bill Todd (TeamB)" <b...@dbginc.com> wrote in message
news:8lakmu$l3l16@bornews.borland.com...

Quote
> The error you are getting has _nothing_ to do woth the PDOXUSRS.NET file.
> The problem is a network problem or multiple users trying to place or
> release locks on the same table at the same time and one of them gets the
> error because the PDOXUSRS.LCK file segment that the user needs to lock is
> already locked by someone else. Try using DbiSetLockRetry as I suggested
in
> my original message. I would strongly suggest you try to eliminate the
query
> and use SetRange with a TTable instead. With 50 concurrent users you are
> getting to the point where you should think about moving to a database
> server instead of using Paradox tables.

> --
> Bill Todd (TeamB)
> (Questions received via email cannot be answered.)

Other Threads