Click here to Skip to main content
15,904,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there
In online booking systems for instance train ticket booking the when user click for new ticket he notice a seat is free.But at the time of clicking booking button get a message that the seat is reserved,if it s reserved by some1 prior to him.....

How to make this....?

When I work I get error message "Primary Key" violation (Eg)
Thank You in advance
Posted

You could 'Lock out' that seat for, say, 5 minutes, whilst booking.
 
Share this answer
 
couple of thoughts here to further DD's answer

have you thought of dealing with such error in the try catch area? or sql notification (asusming your using sql server 2005 or greater!)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900