PDA

Click to See Complete Forum and Search --> : Data call


Saint
Aug 4th, 1999, 03:09 PM
I am making a booking program and I need to put in a date to check for avalibility but I can do it fine if I only had one room but I have 10 rooms so I need a call to check for dates during the specified time and once ten dates during that time have been taken then it must come up with a sorry rooms full dialog box.
Any sugestions or help would be appreciated. I can exchange help for free accomadation in my hotel on the beach in South Africa.

preeti
Aug 4th, 1999, 05:16 PM
Hi,

Let's say that you have a table with a field for the room number, and the date that the room becomes available.

With this date, in VB there is a function call datediff:
DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])

this returns a number for the specifed interval of how much time has passed from date1 to date2.

You could use this function and know in exactly how many days a room will become available from the requested date, or how many days ago it became available. Look in the MSDN Library for more information.

Instead of telling your client that you have no rooms, you can tell them when you will have rooms.

HTH,

Preeti