Click here to Skip to main content
15,897,273 members
Home / Discussions / Database
   

Database

 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Xiangyang Liu 刘向阳18-Dec-09 6:48
Xiangyang Liu 刘向阳18-Dec-09 6:48 
AnswerRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
swjam18-Dec-09 4:37
swjam18-Dec-09 4:37 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
#realJSOP18-Dec-09 4:39
professional#realJSOP18-Dec-09 4:39 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Jörgen Sigvardsson18-Dec-09 4:58
Jörgen Sigvardsson18-Dec-09 4:58 
AnswerRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Steve Westbrook18-Dec-09 4:40
Steve Westbrook18-Dec-09 4:40 
AnswerRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Jörgen Sigvardsson18-Dec-09 4:57
Jörgen Sigvardsson18-Dec-09 4:57 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
David Skelly18-Dec-09 6:21
David Skelly18-Dec-09 6:21 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Xiangyang Liu 刘向阳18-Dec-09 6:46
Xiangyang Liu 刘向阳18-Dec-09 6:46 
What I want in the transaction:

1. Check if a database record's status field is "pending".
2. If it is, then set status field to "processing", then process it. Otherwise, don't do anything.
3. After processing, set the status field to "processed".

If the above code is in a "critical section", then I can guarantee only one client is processing a record. I thought putting the code within a transaction will solve the problem. Apparently not.


JokeRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Chris Meech18-Dec-09 7:25
Chris Meech18-Dec-09 7:25 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Xiangyang Liu 刘向阳18-Dec-09 8:35
Xiangyang Liu 刘向阳18-Dec-09 8:35 
AnswerRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) [modified] Pin
Roger Wright18-Dec-09 6:01
professionalRoger Wright18-Dec-09 6:01 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
David Skelly18-Dec-09 6:23
David Skelly18-Dec-09 6:23 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Roger Wright18-Dec-09 6:38
professionalRoger Wright18-Dec-09 6:38 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Luc Pattyn18-Dec-09 6:43
sitebuilderLuc Pattyn18-Dec-09 6:43 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Roger Wright18-Dec-09 7:09
professionalRoger Wright18-Dec-09 7:09 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Xiangyang Liu 刘向阳18-Dec-09 7:00
Xiangyang Liu 刘向阳18-Dec-09 7:00 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Jörgen Sigvardsson18-Dec-09 7:43
Jörgen Sigvardsson18-Dec-09 7:43 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Xiangyang Liu 刘向阳18-Dec-09 8:38
Xiangyang Liu 刘向阳18-Dec-09 8:38 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Roger Wright18-Dec-09 9:07
professionalRoger Wright18-Dec-09 9:07 
GeneralRe: How do I make a transaction an "atomic" operation? (SQL Server 2005) Pin
Roger Wright18-Dec-09 9:06
professionalRoger Wright18-Dec-09 9:06 
QuestionMSSQL USE Pin
MsmVc18-Dec-09 0:24
MsmVc18-Dec-09 0:24 
AnswerRe: MSSQL USE Pin
Niladri_Biswas18-Dec-09 2:59
Niladri_Biswas18-Dec-09 2:59 
GeneralRe: MSSQL USE Pin
MsmVc18-Dec-09 17:09
MsmVc18-Dec-09 17:09 
QuestionHow to work with folder and File ? Pin
Golden Jing17-Dec-09 22:18
Golden Jing17-Dec-09 22:18 
AnswerRe: How to work with folder and File ? Pin
Ashfield17-Dec-09 23:14
Ashfield17-Dec-09 23:14 

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.