Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL Server 2000 Record locks with ADO

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-05 : 08:47:15
Michael writes "We have a software product (which our company wrote), which is defaulting to TABLE locking on SQL Server 2000 using version 2.0 of our software. This is causing many lockouts.

The same problem doesn't exist in SQL Server 7.0.

Our previous version (1.7) works fine until SQL Server 2000. The big difference between 1.7 and 2.0 is that 1.07 used RDO and 2.0 uses ADO.

It seems like ADO is changing the SQL Server 2000 default TRANSACTION ISOLATION LEVEL to SERIALIZABLE.

We need a way around this without having to change every single program."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2001-12-05 : 09:17:35
If your database code utilizes stored procedures in SQL Server, then you can modify those to use ROWLOCK or PAGLOCK hints in their SQL statements. Otherwise, I don't believe that you can fix this without modifying the lock type on each individual ADO connection and/or recordset object.

I would recommend that using stored procedures would be better, and that all of your locking be handled through them. It's a more flexible and powerful method, the locking method is more explicitly stated, and it avoids the unfortunate side effects that occur when default behavior changes, such as you're experiencing now.

Go to Top of Page
   

- Advertisement -