|
||||||
| General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
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 |
| Sponsored Links |
|
|
|
|||
|
This should be placed in the correct database section, please tell us what engine you are using. And yes, most databases allow locking.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||
|
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 |
|
|||
|
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 ![]() |
|
|||
|
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 |
| Sponsored Links |
|
|
|
|||||
|
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.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Doing final year project based upon an intrusion detection system (IDS) - Need Help! | naveed.pasha | Programming Theory | 6 | 07-07-2008 07:15 PM |
| [Pascal in Delphi]System to system | Krad | Pascal/Delphi | 5 | 12-27-2007 02:35 PM |
| New Scoring System Protects Credit Card Transactions | Kernel | Programming News | 0 | 11-16-2007 09:37 AM |
| Operating System | prnoct90 | General Programming | 6 | 11-01-2007 11:56 PM |
| Project: vBulletin Alert System (vbAS) | Crane | Community Projects | 18 | 12-13-2006 11:54 AM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |
Goal: 100,000 Posts
Complete: 97%