Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

locking with ADO.NET and Sql Server

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

How can we implement pessimistic approch with VB.NET? (using SQL Server)

If I make a transaction I can use trasaction isolation level, but if I just make a commad? What type of lock will be made?

And if i use transaction level, Am I always using pessimistic approch?

Thank you

 
<snip>How can we implement pessimistic approch with VB.NET? </snip>

Why would you want to? Doesn't anyone ever read the data? Isn't locking an issue to you?

Pessimistic locking by definition locks the record on begin edit and will stop any read until such time as a commit occours..

Optimistic locking can cause enough problems... but if you really want pessimistic.. In .Net use ADO and not ADO.Net.. All your old methods are there. Pessimistic locking was removed for a reason.

my 1c

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top