|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Calendar datebase
Hi. I have build a database to be used in a asp page that are going to work as a booking calendar. everthing works fine, but i whould like to have a check when you add a new post that there are no dubblebookings, if for example a meeting between 10-13 on 2004-01-15 how do i make a check that can tell me that i cant make a booking on 2004-01-15 time 11-12?
my datebase looks like this.. one tabel with the date and to for time start and stop time. can anyone help me.. i have been thinking about this alot and i can't get it to work /thanks Kenneth |
|
#2
|
|||
|
|||
|
From ASp you will run a SQL statement that will check to see is if your Start time fall between a scheduled meeting. If the SQL statement brings back any data then the answer is yes, you are trying to double book. IF it brings back no data then you are okay with you start time and you need to check the end time. and do the same thing with it
here is sample sql statement SELECT Table1.MDate, Table1.MStartTime, Table1.MEndTime FROM Table1 WHERE (((Table1.MDate)=[MeetingDate]) AND ((Table1.MStartTime)<[StartTime]) AND ((Table1.MEndTime)>[StartTIme])); Good Luck S- |
|
#3
|
|||
|
|||
|
Thanks alot! this should work just great.
|
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Calendar datebase |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|