How Do I approach?

P

Prabhat

Hi All,

I have provision for Live Demo in my website.

The user has to select the date and time for the Live demo in my website. My
problem is all the users are selecting the 1st available date & time.
Currently my date field is 3 drop down combo boxes which I am planning to
change to a calendar control and the time is 2 combo box with hour and
minute.

To get rid of the SAME TIME Selection by users I want to provide only the
date and time that are available and free. Mean I have to save the Demo
request Date and Time somewhere in Text file or Database.

Please suggest how do I go for this and what should be best path to
approach?

Thanks
Prabhat
 
E

Evertjan.

Prabhat wrote on 11 okt 2005 in microsoft.public.inetserver.asp.general:
Hi All,

I have provision for Live Demo in my website.

The user has to select the date and time for the Live demo in my
website. My problem is all the users are selecting the 1st available
date & time. Currently my date field is 3 drop down combo boxes which
I am planning to change to a calendar control and the time is 2 combo
box with hour and minute.

To get rid of the SAME TIME Selection by users I want to provide only
the date and time that are available and free. Mean I have to save the
Demo request Date and Time somewhere in Text file or Database.

Please suggest how do I go for this and what should be best path to
approach?

If you mean not using the same date's at the same time,
the easiest way seems to save them in an application variable string.

application("usedDates") = application("usedDates") & "|" & nextUsedDate
 
C

Curt_C [MVP]

a simple table with the slots and then all you need is for your SELECT
command to use a WHERE clause that says something like "...where USERNAME = '
'...."
 
P

Prabhat

If you mean not using the same date's at the same time,
the easiest way seems to save them in an application variable string.

application("usedDates") = application("usedDates") & "|" & nextUsedDate

No. my requirement is if the time (ex: 10:00 am of 13 Oct 2005) is booked
then other user should not able to select that time (10:00 am) for 13 Oct.

Thanks
Prabhat
 
E

Evertjan.

Prabhat wrote on 11 okt 2005 in microsoft.public.inetserver.asp.general:
No. my requirement is if the time (ex: 10:00 am of 13 Oct 2005) is
booked then other user should not able to select that time (10:00 am)
for 13 Oct.

Ever?

Or for the duration of the IIS-application?

My assumption was the latest, so a list of used date/times in an
application variable should suffice.

If "ever" howver:

you could make a list in a datebase, while deleting any used entry. The
three choices could be randomly selected from the non deleted database
records.
 
P

Prabhat

Evertjan. said:
Ever?

Or for the duration of the IIS-application?

My assumption was the latest, so a list of used date/times in an
application variable should suffice.

If "ever" howver:

you could make a list in a datebase, while deleting any used entry. The
three choices could be randomly selected from the non deleted database
records.

Hi,

I think the best way will be Application level because we will never process
the details and this info will be used only to distribute the time for demo.

So if that is Application level you are suggesting to go for Application
variable. So i think I need to use lock and unlock before I send the page to
client.

application.lock
application("usedDates") = application("usedDates") & "|" & nextUsedDate
application.unlock

and I will not fill the time combo (hours and minutes combo boxes) with the
used ones? Can you please elaborate?

Thanks
Prabhat
 
P

Prabhat

Evertjan. said:
Ever?

Or for the duration of the IIS-application?

My assumption was the latest, so a list of used date/times in an
application variable should suffice.

If "ever" howver:

you could make a list in a datebase, while deleting any used entry. The
three choices could be randomly selected from the non deleted database
records.

In addition to my prev post... Then will not the Application variable will
be very BIG after some days?

Thanks
Prabhat
 
E

Evertjan.

Prabhat wrote on 11 okt 2005 in microsoft.public.inetserver.asp.general:
application.lock
application("usedDates") = application("usedDates") & "|" &
nextUsedDate application.unlock

and I will not fill the time combo (hours and minutes combo boxes)
with the used ones? Can you please elaborate?


You would have to check this string for the existence of the palnned
date/time, and if already there, try another one. The instr() comes
handy.
In addition to my prev post... Then will not the Application variable
will be very BIG after some days?

My distant website usualy restarts every few days and the whole proces
coould start over again, with possibly the dame date/time-s if that is a
problem, the application object is not the right choice.

If your system doe not start over, you could empty the string when above
a certain size [and perhaps renew the pool of available dates ad
random?]:

if len(application("usedDates"))>50000 then application("usedDates")=""

[or a smaller number of letters?]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,701
Latest member
XavierQ83

Latest Threads

Top