Have you stopped using ADO?

  • Thread starter Thread starter Vayse
  • Start date Start date
V

Vayse

Just wondering - has everyone switched to ADONet, or do you still use 'old'
ADO for something?
Vayse
 
We have a legacy application that is written in VB6 that won't be upgraded
to .NET b/c it'll just be phased out. Until the replacement is built, we'll
be using it and it uses ADO as do a few third party products we have. If
your question though is do I still developer using ADO, definitely no on
that count.
 
Vayse,

To create a Jet engine you need ADO (only to create the engine)

If you want to use pessimistic concurrency than it is probably easier to use
Ado. Know than that you use it with all its disadvantages comparing to
ADONET. Two of those disadvantages of Ado is that it has always to be used
connected to the DataBase and has not those serialize possibilities as
ADONET.

I hope that this gives some idea.

Cor
 
You can open a Pessimistic lock in ADO.NET using transaction isolation.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Hi Bill,
You can open a Pessimistic lock in ADO.NET using transaction isolation.
I did not know that, do you have a simple sample for that using a
DataSet(or a link to it). I have already searched long to find a solution
for a real pesimistic lock with a dataset.

Cor
 
Just do a BeginTransaction, pass in IsolationLevel Serializable, assign that
to the SqlCommand.Transaction properties - and you have pessimistic locking.
Alternatively, use TransactionScope and dictate that Isolation level through
there - remember to manage your connection lifetime when mixing DataAdapter
and TxScope.
Or just change your commandtext to SELECT (HOLDLOCK) and manage connection
lifetime yourself .. same sh!t different smell.

Tonnes of ways of doing Pessimistic Locking in ADO.NET.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
__________________________________________________________
 
Back
Top