Preventing multiple admin doing concurrent updates on the database

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2008
Posts: 7
Reputation: pradeepkk2008 is an unknown quantity at this point 
Solved Threads: 0
pradeepkk2008 pradeepkk2008 is offline Offline
Newbie Poster

Preventing multiple admin doing concurrent updates on the database

 
0
  #1
Oct 23rd, 2008
Hello ,

My application has an admin section which stores its password in web.config file. There can be case when simultaneosly 2 administrator logs in admin section and try to update the same database. I want to prevent this from happening. Can anyone suggest how to implement this. Update functionality runs via threading.

Regards,
Pradeep
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,233
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 539
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Preventing multiple admin doing concurrent updates on the database

 
0
  #2
Oct 23rd, 2008
use record locking
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,162
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 137
dickersonka dickersonka is offline Offline
Veteran Poster

Re: Preventing multiple admin doing concurrent updates on the database

 
0
  #3
Oct 27th, 2008
agree with jbennet

you can choose to create your own method of locking, or go by sql physical locking

not sure what db or version you are using, but the sql concepts are row lock or table lock

if you want to implement this yourself, you can add a locked column to the row and set to 1 or 0 depending upon its current state
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,233
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 539
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Preventing multiple admin doing concurrent updates on the database

 
0
  #4
Oct 27th, 2008
table, record or database lock
depends on what DBMS you are using.
Record (row) is generally the best

If you are using a microsoft technology its dead easy to set up.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC