By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,841 Members | 840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,841 IT Pros & Developers. It's quick & easy.

how to lock the selected records using C#?

P: n/a
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!!
--
marxi
Feb 28 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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.

"marxi" <ma***@discussions.microsoft.comha scritto nel messaggio
news:73**********************************@microsof t.com...
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!!
--
marxi

Feb 28 '07 #2

P: n/a
I use sql server database and how to realize it?
can you give me a example?
Thank you very much!
--
marxi
"Laura T." wrote:
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.

"marxi" <ma***@discussions.microsoft.comha scritto nel messaggio
news:73**********************************@microsof t.com...
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!!
--
marxi


Feb 28 '07 #3

P: n/a
You might want to post this to microsoft.public.dotnet.framework.adonet.

Robin S.
------------------------------------------
"marxi" <ma***@discussions.microsoft.comwrote in message
news:25**********************************@microsof t.com...
>I use sql server database and how to realize it?
can you give me a example?
Thank you very much!
--
marxi
"Laura T." wrote:
>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.

"marxi" <ma***@discussions.microsoft.comha scritto nel messaggio
news:73**********************************@microso ft.com...
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!!
--
marxi



Feb 28 '07 #4

P: n/a
marxi wrote:
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
Mar 4 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.