-
December 19th, 2006, 05:34 AM
#1
SQL Server locking problem
Hi,
I have a VB 6.0 application that is a front end for an SQL Server database. The problem is than if an instance of the application uses the same form that uses another instance of the same application on another computer, on instance block the other an vice versa. When I update information on the server I use transactions. I tried all the options for cnn.IsolationLevel=X, but no result. If even the aplications tries to query a table that is opened with Entreprise Manager, the application is locked by the Entreprise Manager. If i close the table the problem is solved and the application is unlocked and it can query the table. THE TABLE IS OPEN FOR VIEWING, not for design or update.
Can anyone help me? Thanks.
-
December 19th, 2006, 05:48 AM
#2
Re: SQL Server locking problem
I use SQL Server 2000.
Thanks
-
December 19th, 2006, 07:57 AM
#3
Re: SQL Server locking problem
If you get the data of the table via recordsets, check the .locktype property of the recordset. Your description of the problem indicates that you use adlockpessimistic. That should be changed to .adlockoptimistic.
HTH
have a nice day
Patzer
_____________________________
Philo will never be forgotten
-
December 19th, 2006, 08:34 AM
#4
Re: SQL Server locking problem
Hi,
Yes, I use recordset, but LockType = adLockOptimistic
Not this is the problem.
Thanks anyway.
-
December 23rd, 2006, 04:33 PM
#5
Re: SQL Server locking problem
Are you using a static, dynamic or unspecified cursor?
I have many multi-user apps using VB and SQL Server and I found that using batch updates and a static cursor gives the least problems i.e.
rs1.Open cmd1, , adOpenStatic, adLockBatchOptimistic
-
December 24th, 2006, 04:45 AM
#6
Re: SQL Server locking problem
I use adOpenStatic and adLockOptimistic.
-
December 24th, 2006, 11:10 AM
#7
Re: SQL Server locking problem
I am not sure,but maybe it happens because user privilege into DB is Lock table on mode exclusive or something so.
oversee user privilege.
-
December 24th, 2006, 11:34 AM
#8
Re: SQL Server locking problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|