CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How to prevent double bookings

Print topic Send  topic

Author Message
Tornado
Posted: 11/07/2004, 3:42 AM

I have developed an accommodation booking app, but still need to check for availablity before the new booking is inserted. The system uses 2 dates (arrival and departure) and has several Rooms. The bookings are straight forward (everybody checking in at 13h00 and leaving at 11h00). Should I try a "Before insert event" check, or use a "between dates" in the SQL, or just asp if statements while scanning all the current bookings? I have tried the last option, but cannot make it work 100%. Any ideas or examples?
Tuong Do
Posted: 11/07/2004, 2:33 PM

There are 4 possibles outcome here it depend on how you define each of the
outcome

Case Arrival time Depart Time
1 NULL NULL
2 NULL 11:00
3 13:00 NULL
4 13:00 11:00

Case 1 has not been booked and no one is in (room is not book yet)
Case2 some one is in and is leaving (room is not book yet)
Case3 Someone is moving in (room is book)
Case4 room is booked

Dim RoomBooked

If (ArriTime = empty) Then
RoomBooked = True
Else
RoomBooked = False
End If


"Tornado" <Tornado@forum.codecharge> wrote in message
news:6418e0a3233dcd@news.codecharge.com...
>I have developed an accommodation booking app, but still need to check for
> availablity before the new booking is inserted. The system uses 2 dates
> (arrival and departure) and has several Rooms. The bookings are straight
> forward (everybody checking in at 13h00 and leaving at 11h00). Should I
> try a
> "Before insert event" check, or use a "between dates" in the SQL, or just
> asp
> if statements while scanning all the current bookings? I have tried the
> last
> option, but cannot make it work 100%. Any ideas or examples?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.