Page 1 of 1

"Lock request time out period exceeded"

Posted: Wed 13 Oct 2010 10:37
by Grupo77
I always get this error in my application in a concret scenario.

An user is stopped with a transaction open, the commit is not done yet. This user has done a lot of selects and a few updates (5) trough the transaction.

When another user try to read (make a select) through a new transaction in a specific table gets this error: "Lock request time out period exceeded".

I have change TMSConnectionOptions.DefaultLockTimeout to 6000, 15000... but always I receive the same error.

I have a configuration that enables or not the SDAC components. Without SDAC (through ADO native delphi components) everything performs well, but when I active SDAC (4.80) I get this error.

Must I change any other configuration? Can anybody help me?

Any comment is welcome.


Ferran.

Posted: Thu 14 Oct 2010 12:44
by AndreyZ
Hello,

Please check that all your tables have a Primary Keys. When a table doesn't have a Primary Key and you are trying to lock the record, the whole table will be locked instead of one record.

Posted: Fri 15 Oct 2010 06:37
by Grupo77
Thanks AndreyZ.

All my tables heve Primary Keys.

I found one solution. My application is running on a computer where is installed the "SQL Server Native Client".

The standard components that Delphi owns perform well because don't use the Native Client of SQL Server.

I change the TMSConnectionOptions.Provider property to "prSQL" and then the error disappeared. Don't ask me why. I don't know why using the Native Client I got this error.

This solution is good enough for me, I don't use any "SQL Server Native Client" special fuctionallity.

Ferran.

Posted: Fri 15 Oct 2010 07:21
by AndreyZ
It is good to see that this problem has been solved.