Greetings,
I am currently making a payment system.
I am wondering what happens if a multiple buyers send a coder payment at the same time?
When each payment occurs, I use coldfusion to look up the current money amounts for the buyer and coder. I do the necessary calculations to transfer money and then update the database.
What happens if during the 2nd payment, the origal amount is set before the first payment is updated?
Is there a way to lock a table in the database until the first payment is complete?
Any help will be greatly appreciated! Thanks in advance!
Sincerely,
Travis Walters
admin@codebuyers.com
Payment System Question
Started by twalters84, Mar 14 2008 01:00 PM
5 replies to this topic
#1
Posted 14 March 2008 - 01:00 PM
spammy sig deleted
|
|
|
#2
Posted 14 March 2008 - 01:29 PM
This should be placed in the correct database section, please tell us what engine you are using. And yes, most databases allow locking.
#3
Posted 14 March 2008 - 06:11 PM
Hey there,
Thanks for the prompt response.
I am using a MS SQL Server 2005 database and Coldfusion to manipulate it.
Thanks in advance for anymore information you can provide me with.
Sincerely,
Travis Walters
Thanks for the prompt response.
I am using a MS SQL Server 2005 database and Coldfusion to manipulate it.
Thanks in advance for anymore information you can provide me with.
Sincerely,
Travis Walters
spammy sig deleted
#4
Posted 14 March 2008 - 07:00 PM
Found the solution I was looking for here:
Macromedia - Devnet: Controlling Database Transactions in ColdFusion MX
Very nice article for those who have the same issue :)
Macromedia - Devnet: Controlling Database Transactions in ColdFusion MX
Very nice article for those who have the same issue :)
spammy sig deleted
#5
Posted 14 March 2008 - 07:10 PM
Hey there,
I was just wondering if I have a piece of code that is locked with cftransaction, and another piece of code that tries to access the locked rows simultaneously, what will happen with that other piece of code?
Will that other piece of code wait until the first transaction is complete?
Do I need to place a loop around the cftransaction to make sure it executes?
Thanks for any clarification you guys can give me :)
Sincerely,
Travis Walters
I was just wondering if I have a piece of code that is locked with cftransaction, and another piece of code that tries to access the locked rows simultaneously, what will happen with that other piece of code?
Will that other piece of code wait until the first transaction is complete?
Do I need to place a loop around the cftransaction to make sure it executes?
Thanks for any clarification you guys can give me :)
Sincerely,
Travis Walters
spammy sig deleted
#6
Guest_Jordan_*
Posted 15 March 2008 - 06:47 AM
Guest_Jordan_*
Although I don't know for sure, I imagine you will get a database error of some kind. The best way to know is to try it. Create a test DB and lock rows in it. Try to access those locked rows and see what happens.
You may need to catch the error, wait xx seconds and try again.
You may need to catch the error, wait xx seconds and try again.


Sign In
Create Account


Back to top









