Connection.Options.DefaultLockTimeout what was the lock value before this new option was introduced?

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
toni.brown
Posts: 3
Joined: Mon 20 Jun 2016 22:33

Connection.Options.DefaultLockTimeout what was the lock value before this new option was introduced?

Post by toni.brown » Mon 20 Jun 2016 22:43

Hi,

I'm migrating a D7 project which is still using sdac 4.35 to XE7 and the later sdac version.

In testing we've noticed we are getting an error like

"Lock request time out period exceeded." which we think is MSSQL related and to do with the 2000ms timeout with the 'new' Connection.Options.DefaultLockTimeout option that we didn't have in the D7 version.

So my question is what was effectively the previous value for waiting on a lock before this option came into play? Was it perhaps indefinite?

Thanks,

Toni

ViktorV
Devart Team
Posts: 2299
Joined: Wed 30 Jul 2014 07:16

Re: Connection.Options.DefaultLockTimeout what was the lock value before this new option was introduced?

Post by ViktorV » Tue 21 Jun 2016 10:07

The TMSConnection1.Options.DefaultLockTimeout property is used to set the DBPROP_SSCE_DEFAULT_LOCK_TIMEOUT property of the OLE DB provider. If the TMSConnection.Options.DefaultLockTimeout property is set to the default value (2000), the OLE DB provider will use its default values. See more details about this property at: https://technet.microsoft.com/en-us/lib ... .110).aspx This behavior wasn't changed in comparison to SDAC 4.35.

toni.brown
Posts: 3
Joined: Mon 20 Jun 2016 22:33

Re: Connection.Options.DefaultLockTimeout what was the lock value before this new option was introduced?

Post by toni.brown » Tue 21 Jun 2016 21:51

Hi Victor,

Thanks for the reply. I'm looking though in the Delphi 7 version and I don't actually see that property in the connection options for I think it was version 4.35.1.15 18-Feb-08

I'm assuming it just waits then indefinitely until there is some command timeout setting in place as well?

For XE7 to mimic the same behaviour, I am currently setting TMSConnection1.Options.DefaultLockTimeout to -1 which seems to do the same thing... does that sound like what -1 should be doing?

Thanks,

Toni

ViktorV
Devart Team
Posts: 2299
Joined: Wed 30 Jul 2014 07:16

Re: Connection.Options.DefaultLockTimeout what was the lock value before this new option was introduced?

Post by ViktorV » Thu 23 Jun 2016 14:42

Yes, you are right. When setting the TMSConnection.Options.DefaultLockTimeout property to -1, the default value of SQL Server is used, that indicates no time-out period (that is, wait forever).

Post Reply