Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am using visual studio 2010,
my problem is when there are more than one person upload the same id's photo at the same time there will shows error.

how do I write a script to create a Q for them (e.g when 1st person is doing the submission the 2nd person submit image will wait in a Q then after 1st person submit they will do the job)
however there is a ID for it. hence when both of them open the ID is the same. so the error prompt.

1) can I check if the is the ID pop up message that there is a person update in this session , and please upload later?

can anyone give me some advice? thanks
Posted

1 solution

Set a BIT field called IsLocked in database, whenever the record for a particular ID is accessed then set that field to TRUE. Again if another user tried to access same ID, hit the database and find the value of IsLocked. If it is true, show information to second user that it is being edited, please try again later, if it is false allow the second user to access the record.
Hope this helps you. Let me know if you need any clarifications.
Try!
 
Share this answer
 
Comments
jiasing 16-Aug-12 0:01am    
Thanks for the reply! I will try it.
jiasing 16-Aug-12 3:03am    
Hi,

may I know how to put it in database. or put it in the button_Click ?
Vani Kulkarni 16-Aug-12 5:40am    
Yes. Whenever user tries to access the record, you will have the ID with you. Hit the database at that time and set the isLocked field to true for that ID.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900