Hi,
I am working on Hotel Application and I need your help on how to prevent booking a room twice. That is, if a room is booked for 3 days(24/2/2015(18.00) to 27/2/2015(7.00)), no room can be booked withing that period. Am developing the project with Asp.Net(VB) ans Sql Database.
Thanks in advance.
jonathan.paul.7543
0
Newbie Poster
Recommended Answers
Jump to PostYou are probably better off moving the question to asp web development in Dani
Jump to PostYou can use a flag for Booking/Non-booking, like True/False. Make your querry on that flag.
Jump to PostOr retrieve the dates and match with the current dates to see if the booked room is available or not.
Jump to PostYou will need a table with your bookings.
Room_Number, Customer, Booking_Start, Booking_End. Primary key is Room_Number + Booking_Start. Unique key is Room_Number + Booking_End. Foreign keys are Room_Number (to table Rooms), Customer (to table Customers).
To check if a room has already been booked for a new booking do a …
Jump to PostIf you have already verified the date then you will also need to verify the times as well so for instance suppose you also have a field to hold the time a current guest will leave the apartment then you can check the time and then if you wish to …
All 22 Replies
Minimalist
96
Posting Pro
Santanu.Das
125
Santanu Das
Mr.M
58
Future Programmers
Nutster
58
Newbie Poster
jonathan.paul.7543
0
Newbie Poster
Mr.M
58
Future Programmers
David_50
13
Junior Poster in Training
Nutster
58
Newbie Poster
Nutster
58
Newbie Poster
jonathan.paul.7543
0
Newbie Poster
Nutster
58
Newbie Poster
Mr.M
58
Future Programmers
jonathan.paul.7543
0
Newbie Poster
jonathan.paul.7543
0
Newbie Poster
Mr.M
58
Future Programmers
David_50
13
Junior Poster in Training
jonathan.paul.7543
0
Newbie Poster
David_50
13
Junior Poster in Training
Mr.M
58
Future Programmers
Mr.M
58
Future Programmers
jonathan.paul.7543
0
Newbie Poster
David_50
13
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.