Lost Password?


Go Back   CodeCall Programming Forum > Software Development > General Programming

General Programming Non language specific, Assembly, Linux/Unix, Mac and anything not covered in other topics. Talk about Programming Theory here.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-14-2008, 05:00 PM
twalters84 twalters84 is offline
Learning Programmer
 
Join Date: Oct 2007
Posts: 56
Rep Power: 5
twalters84 is on a distinguished road
Default Payment System Question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 03-14-2008, 05:29 PM
TkTech TkTech is offline
 
Join Date: Jun 2006
Posts: 990
Last Blog:
Having trouble with yo...
Rep Power: 20
TkTech is on a distinguished road
Send a message via MSN to TkTech
Default Re: Payment System Question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-14-2008, 10:11 PM
twalters84 twalters84 is offline
Learning Programmer
 
Join Date: Oct 2007
Posts: 56
Rep Power: 5
twalters84 is on a distinguished road
Default Re: Payment System Question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-14-2008, 11:00 PM
twalters84 twalters84 is offline
Learning Programmer
 
Join Date: Oct 2007
Posts: 56
Rep Power: 5
twalters84 is on a distinguished road
Default Re: Payment System Question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-14-2008, 11:10 PM
twalters84 twalters84 is offline
Learning Programmer
 
Join Date: Oct 2007
Posts: 56
Rep Power: 5
twalters84 is on a distinguished road
Default Re: Payment System Question

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 03-15-2008, 10:47 AM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,203
Last Blog:
Ext JS or Ext GWT
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: Payment System Question

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

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


All times are GMT -5. The time now is 02:40 AM.

Contest Stats

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

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads