Click here to Skip to main content
15,899,026 members
Home / Discussions / C#
   

C#

 
GeneralRe: unsafe Pin
sanforjackass25-Dec-09 22:53
sanforjackass25-Dec-09 22:53 
GeneralRe: unsafe Pin
dan!sh 25-Dec-09 23:00
professional dan!sh 25-Dec-09 23:00 
GeneralRe: unsafe Pin
sanforjackass25-Dec-09 23:44
sanforjackass25-Dec-09 23:44 
Questiontypes formats in app.config Pin
Hussam Fattahi25-Dec-09 22:21
Hussam Fattahi25-Dec-09 22:21 
AnswerRe: types formats in app.config Pin
dan!sh 25-Dec-09 22:42
professional dan!sh 25-Dec-09 22:42 
QuestionAborting a Thread. Pin
Ronni Marker25-Dec-09 22:12
Ronni Marker25-Dec-09 22:12 
AnswerRe: Aborting a Thread. Pin
Nicholas Butler25-Dec-09 22:46
sitebuilderNicholas Butler25-Dec-09 22:46 
GeneralRe: Aborting a Thread. Pin
Ronni Marker26-Dec-09 2:30
Ronni Marker26-Dec-09 2:30 
AnswerRe: Aborting a Thread. Pin
Luc Pattyn26-Dec-09 1:50
sitebuilderLuc Pattyn26-Dec-09 1:50 
GeneralRe: Aborting a Thread. Pin
Ronni Marker26-Dec-09 2:32
Ronni Marker26-Dec-09 2:32 
GeneralRe: Aborting a Thread. Pin
Luc Pattyn26-Dec-09 3:00
sitebuilderLuc Pattyn26-Dec-09 3:00 
QuestionOpen picture from application and edit with default picture edit application ? Pin
Yanshof25-Dec-09 10:27
Yanshof25-Dec-09 10:27 
AnswerRe: Open picture from application and edit with default picture edit application ? Pin
Luc Pattyn25-Dec-09 11:21
sitebuilderLuc Pattyn25-Dec-09 11:21 
Questionvisual studio and UML diagrams and unit testing Pin
Ryan Minor25-Dec-09 5:46
Ryan Minor25-Dec-09 5:46 
AnswerRe: visual studio and UML diagrams and unit testing Pin
Dimitri Witkowski25-Dec-09 12:20
Dimitri Witkowski25-Dec-09 12:20 
QuestionLabel control that set the focus to the related Textbox on the mousehover event Pin
ArjenGroeneveld25-Dec-09 4:23
ArjenGroeneveld25-Dec-09 4:23 
AnswerRe: Label control that set the focus to the related Textbox on the mousehover event Pin
Md. Marufuzzaman25-Dec-09 8:04
professionalMd. Marufuzzaman25-Dec-09 8:04 
AnswerRe: Label control that set the focus to the related Textbox on the mousehover event Pin
Martin#14-Jan-10 9:48
Martin#14-Jan-10 9:48 
QuestionRichTextBox - Text Pin
dataminers25-Dec-09 1:35
dataminers25-Dec-09 1:35 
AnswerRe: RichTextBox - Text Pin
santhosh-padamatinti26-Dec-09 7:17
santhosh-padamatinti26-Dec-09 7:17 
GeneralRe: RichTextBox - Text Pin
dataminers29-Dec-09 22:45
dataminers29-Dec-09 22:45 
QuestionDisplay user control in place of default tooltip Pin
billu 225-Dec-09 1:16
billu 225-Dec-09 1:16 
AnswerRe: Display user control in place of default tooltip Pin
Abhijit Jana25-Dec-09 1:42
professionalAbhijit Jana25-Dec-09 1:42 
GeneralRe: Display user control in place of default tooltip Pin
billu 225-Dec-09 1:53
billu 225-Dec-09 1:53 
QuestionSynchronisation in Multi Server environment Pin
c0der200925-Dec-09 1:11
c0der200925-Dec-09 1:11 
I have a process which can be run from any number of servers. All of them access the same database. How do I synchronize the severs data access?

Here are the details.

My common database server has a table T1. It has columns C1, C2 and C3.

My process has the following steps.
1. Read T1 table.
2. If there is any row with value V1 for C1, wait in a loop and go to step-1.
3. If there are no such rows, insert a row with V1 for C1 and appropriate values for the rest of the columns.
4. Start my business logic.
5. Once the business logic is complete, delete the row entered in step-3.

Now the same process runs from different servers. So there is a chance that 2 or more processes will do steps 1 and 2 simultaneously and might end up creating 2 or more rows with V1 value for C1. I don't want that to happen. How will I make sure only once process can perform steps 1 and 2 at a time? I can not use lock and monitor to synchronize the access as I am running from different process spaces.

How do I do it then?

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.