November 24, 2009 at 10:16 pm
My scenario as follow,
1. Thomas is a Ticket Agent for GSC Bus
2. As Ticket Agent, he have a Prepaid.
3. Let's say, his balance is $125.45
4. Now, he perform purchasing 12 Ticket -- This process only click 1 submit button on front-end, front-end code will doing a looping to hit Stored Procedure
4. Total Amount for 12 Ticket is $130.45 -- at this level, he exceed his prepaid
My question is,
1. How transaction can manage the Atomicity for this Bulk Insert (12 insert into the table)?
2. Where to check the Total of Ticket Amount?
3. Did i need to check the sum of the 12 ticket <= $125.45 at front-end first, then perform the transaction? or check the sum of the 12 ticket <= $125.45 at Back-end (Stored Procedure), then perform the transaction?
November 25, 2009 at 8:38 pm
Since this sounds a whole lot like homework, I'd imagine that you won't get very much help unless you also show what you've tried in code and explain why. Personally, I have no problem helping folks achieve understanding on homework, but they have to try first.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply