Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 14th, 2004, 01:19 PM
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Concurrency

I building an online movie ticketing web site for my project. See the situation below:

[u]Situation</u>
- 2 users wanto book the same seat at the same time.

[u]Problem</u>
-if 2 users try to book the same seat at the same time, confliction will occur.
-when 2 users click the "Book" button to book the seat at the same time, they dont have any ideal taht the seat is already booked by the other user.
-Database concept: first user book the seat by locking the row to update the row in the database. So the second user cant do the transaction until first user release the lock. That is mean the second user still can continue to book the same seat after the first user finish the transaction. Since we know that only one user can book the seat, but the situation here is the second user has overwrite the first user data.

How to solve this problem? * I'm using asp.net and mysql database.



 
Old May 14th, 2004, 01:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You can create an OLEDBTransaction object that works in the .NET framework. This may be a solution; look in the MSDN. I don't know anything about mysql, so I can't help you out there.

Another solution is to store a flag in the table that contains the row information for tickets, and whenever someone is even looking at the tickets, flag that ticket so that future users can't see those tickets (another parameter for the SQL query when you check available tickets).

Brian
 
Old May 17th, 2004, 12:53 AM
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

since you dont know anything about msql, you also can give me some solution using other database like oracle or MS SQL 2000.





Similar Threads
Thread Thread Starter Forum Replies Last Post
concurrency problems Dorean Visual Studio 2005 1 September 4th, 2007 10:38 AM
CONCURRENCY pallone SQL Server 2000 13 December 6th, 2006 12:01 PM
Concurrency issues vitthala ASP.NET 2.0 Basics 3 October 18th, 2006 11:42 AM
Concurrency problem sanjaymannnet ASP.NET 1.0 and 1.1 Professional 0 July 10th, 2006 05:42 AM
Concurrency Issue billy_bob_the_3rd Classic ASP Components 1 October 23rd, 2004 09:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.