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.
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.
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.
__________________________________
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.
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.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.