MS ACCESS, ASP HELP

MS ACCESS, ASP HELP

am 19.01.2006 19:39:28 von Gavin Hall

Hi,

I am a Business student in my last year and for my final year project

I am trying to build an online booking appointment system for a beauty
shop

I am using dream-weaver MX, ASP (VBScript), and an Access database.

I have a limited knowledge of any programming aspects



on my appointments page I am using a form to send the data to the
database,

The problems I am having are as follows;



I can input a date and time in to the database from the form and the
connection is successful and the database updates and I receive a new
page with the appointment details on .

But when I try and submit a new appointment the entry I want to check
first of all is if the date is valid (e.g. not before the current date,
it has to be either on current date or in the future, you can’t book an
appointment for time that has past)

When this is checked in the database I have the validation set at >=date
() and the rule that says “please check the date entered”

I want to create a message box for this if the date entered is before
today’s date or the system date, but at present it shows up a blank web
page stating the following page can not be displayed and the validation
rule is shown. (please check the date entered) I know that this is
checking the database and the validation rule is working but instead of
displaying the blank page I want a error msgbox to appear asking to
re-enter a valid date.



Next problem is that I don’t want to create duplicate bookings e.g.
nobody can book an appointment on the same day at the same time.

When I am testing the data, I received the a similar web page as before
only this time its saying that the database could not be updated as this
would create a duplicate entry in the database. I require another
message box to appear saying something like the time entered is not
available, select another time.



How I can check the appointment time and if the appointment time slot is
available on that date then check the date and if all is ok allow the
database to be updated.



the table is called appointment_details

The fields in the form are

Booking Text

Forename Text

Surname Text

AppointmentDate date/time

AppointmentTime Text (this is a dropdown box, to select the time
e.g. 10:00, 10:30, 11:00 etc)

Submit Button



so in a nut shell

how can check and display a message to say the date is invalid and to
select a new date

and then

how can I check for duplicate time slots on the date entered



(if the date is a valid date then it should go straight on and check
that time is free on that day)



many thanks to all who may be able to help

Cheers




*** Sent via Developersdex http://www.developersdex.com ***

Re: MS ACCESS, ASP HELP

am 20.01.2006 19:33:12 von josephweiss

Here are my thoughts...

First off, letting Dreamweaver MX do all the work is problem #1. Try
to get some experience with just ASP and you'll be a lot happier.

Why not create a month's table with the fields

appointmentDate availability dateID*
------------------------------------------------------------ ----
01/20/2006 yes 1
01/21/2006 no 2

and so on, and simply have the appointmentDates be displayed where the
value = 'yes'

Then you can have someone select an available appointmentDate and when
they do, the availablity gets changed to 'no'

That way you do not have do any date checking. The customer will only
be presented with available dates and then they will choose their date
based only on what's available.

Would that work?

Re: MS ACCESS, ASP HELP

am 23.01.2006 22:58:35 von Paul

And here are some interesting server-side validation links:

Server-Side Form Validation by Dianna Leech - 12/1/1999
http://www.4guysfromrolla.com/webtech/120199-1.shtml

An Email Validation Routine by Jo=E3o Vieira - 4/11/1999
http://www.4guysfromrolla.com/webtech/041199-1.shtml
Somewhat shorter.

An Email Validation Script by Ben Durbin - 5/19/1999
http://www.4guysfromrolla.com/webtech/051999-1.shtml
Longer.

Form Handler: Some light form validation and error notification.
http://www.asp101.com/samples/form_handler.asp
Uses function to loop thru all fields in a form.

Best regards,
-Paul
www.Bullschmidt.com - Freelance Web and Database Developer
www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips