how to lock the selected records using C#?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Now I need to lock the selected records for some time and others can not
update these records meanwhile. How can I do?
any help will be very appreciated!!
 
It usually depends on what DB you are using.
With SQL Server you could try to use locking hints and/or System.Transaction
namespace objects to control the transactional locking.
 
I use sql server database and how to realize it?
can you give me a example?
Thank you very much!
 
You might want to post this to microsoft.public.dotnet.framework.adonet.

Robin S.
------------------------------------------
 
marxi said:
Now I need to lock the selected records for some time and others can not
update these records meanwhile. How can I do?
any help will be very appreciated!!

Try search for "pessimistic locking".

Arne
 

Ask a Question

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.

Ask a Question

Back
Top