473,378 Members | 1,419 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

some advice please

Bob
Hallo,

I have to make a web application in Javascript/ASP for tenniscourt
reservation (based on Access database). I would like to do everything with
one page, because the user must be able to change his day, hour or
tenniscourt choice before really reserving it . I tried like this:

The first SELECT contains the date (next 30 days) and is filled dynamically.
No problem.
When the date is chosen (by clicking), the second SELECT must appears with
the right opening hours (monday = 8 -18h, friday=8-16h etc ..). So i need a
query like "select mondayhour, tuesdayhour ... from daytable". This is no
problem because the code can be placed between <% %> just below the
first SELECT (set objdc = Server.CreateObject("ADODB.Connection" etc ..). No
form needed because no variable to pass to ASP.

My problem is when several tests must be done which require passing
variables to ASP.
Imagine that you can only reserve 2hours in a day. I need a query "select
count(hour) as tothour from reservation where day='" & dat & "' group by
logon having logon='" & login & "'" to check it. So i have to pass 'dat'
(chosen date) and 'login' (name of user) to ASP via a form that i submit to
this ASP file. The value of tothour can be returned by <%=tothour%> to the
client script.
Imagine you can maximum reserve 15 h in 30 days. Again a query "select
logon, count(hour) as tothour2 from reservation where cdate(day)> date()
group by logon having logon='" & login & "'" . Again a form to pass 'logon'
and submit it to itself

If tothour <2, then the third SELECT must appear with the tenniscourt
numbers which are still available. I need another query like "select
tennisnr from reservation where cdate(day)='" & dat & "' and hour=" & hr
(hr=chosen hour). I need to pass "dat" and 'hr" to ASP. So i submit another
form to ASP.
Etc ...

Is this way the right way to work? Does this not become very complicated and
confusing, also because when submitting the second form, the variable
passing through the first form are lost.

Thanks for any advice.
Bob
Jul 19 '05 #1
4 1304
On Fri, 2 Jul 2004 19:07:21 +0200, "Bob" <sd***@no.az> wrote:

You're putting the business logic on the client side of the app when
you do this. There's nothing wrong with that, but as you've seen,
you're doing multiple queries of the database, then posting back to
the same form. Some of this could be encoded in the page logic, such
as which hours the courts are open on which days, or you could do an
initial select for all hours for the next 30 days and then display
them as available/unavailable in a DHTML page where you unhide
elements as others are selected (check a client side or DHTML group
for sample code here).

In essence though, you're doing a scheduling application. Take a look
at scheduling apps available on the web and see if they will fit your
needs, or what ideas they generate in your application. Aspin.com
would make a decent starting place.

Jeff

I have to make a web application in Javascript/ASP for tenniscourt
reservation (based on Access database). I would like to do everything with
one page, because the user must be able to change his day, hour or
tenniscourt choice before really reserving it . I tried like this:

The first SELECT contains the date (next 30 days) and is filled dynamically.
No problem.
When the date is chosen (by clicking), the second SELECT must appears with
the right opening hours (monday = 8 -18h, friday=8-16h etc ..). So i need a
query like "select mondayhour, tuesdayhour ... from daytable". This is no
problem because the code can be placed between <% %> just below the
first SELECT (set objdc = Server.CreateObject("ADODB.Connection" etc ..). No
form needed because no variable to pass to ASP.

My problem is when several tests must be done which require passing
variables to ASP.
Imagine that you can only reserve 2hours in a day. I need a query "select
count(hour) as tothour from reservation where day='" & dat & "' group by
logon having logon='" & login & "'" to check it. So i have to pass 'dat'
(chosen date) and 'login' (name of user) to ASP via a form that i submit to
this ASP file. The value of tothour can be returned by <%=tothour%> to the
client script.
Imagine you can maximum reserve 15 h in 30 days. Again a query "select
logon, count(hour) as tothour2 from reservation where cdate(day)> date()
group by logon having logon='" & login & "'" . Again a form to pass 'logon'
and submit it to itself

If tothour <2, then the third SELECT must appear with the tenniscourt
numbers which are still available. I need another query like "select
tennisnr from reservation where cdate(day)='" & dat & "' and hour=" & hr
(hr=chosen hour). I need to pass "dat" and 'hr" to ASP. So i submit another
form to ASP.
Etc ...

Is this way the right way to work? Does this not become very complicated and
confusing, also because when submitting the second form, the variable
passing through the first form are lost.

Thanks for any advice.
Bob


Jul 19 '05 #2
Bob
Thanks

"Jeff Cochran" <je*********@zina.com> wrote in message
news:40****************@msnews.microsoft.com...
On Fri, 2 Jul 2004 19:07:21 +0200, "Bob" <sd***@no.az> wrote:

You're putting the business logic on the client side of the app when
you do this. There's nothing wrong with that, but as you've seen,
you're doing multiple queries of the database, then posting back to
the same form. Some of this could be encoded in the page logic, such
as which hours the courts are open on which days, or you could do an
initial select for all hours for the next 30 days and then display
them as available/unavailable in a DHTML page where you unhide
elements as others are selected (check a client side or DHTML group
for sample code here).

In essence though, you're doing a scheduling application. Take a look
at scheduling apps available on the web and see if they will fit your
needs, or what ideas they generate in your application. Aspin.com
would make a decent starting place.

Jeff

I have to make a web application in Javascript/ASP for tenniscourt
reservation (based on Access database). I would like to do everything withone page, because the user must be able to change his day, hour or
tenniscourt choice before really reserving it . I tried like this:

The first SELECT contains the date (next 30 days) and is filled dynamically.No problem.
When the date is chosen (by clicking), the second SELECT must appears withthe right opening hours (monday = 8 -18h, friday=8-16h etc ..). So i need aquery like "select mondayhour, tuesdayhour ... from daytable". This is noproblem because the code can be placed between <% %> just below the
first SELECT (set objdc = Server.CreateObject("ADODB.Connection" etc ..). Noform needed because no variable to pass to ASP.

My problem is when several tests must be done which require passing
variables to ASP.
Imagine that you can only reserve 2hours in a day. I need a query "select
count(hour) as tothour from reservation where day='" & dat & "' group by
logon having logon='" & login & "'" to check it. So i have to pass 'dat'
(chosen date) and 'login' (name of user) to ASP via a form that i submit tothis ASP file. The value of tothour can be returned by <%=tothour%> to theclient script.
Imagine you can maximum reserve 15 h in 30 days. Again a query "select
logon, count(hour) as tothour2 from reservation where cdate(day)> date()
group by logon having logon='" & login & "'" . Again a form to pass 'logon'and submit it to itself

If tothour <2, then the third SELECT must appear with the tenniscourt
numbers which are still available. I need another query like "select
tennisnr from reservation where cdate(day)='" & dat & "' and hour=" & hr
(hr=chosen hour). I need to pass "dat" and 'hr" to ASP. So i submit anotherform to ASP.
Etc ...

Is this way the right way to work? Does this not become very complicated andconfusing, also because when submitting the second form, the variable
passing through the first form are lost.

Thanks for any advice.
Bob

Jul 19 '05 #3
Bob
I read something about RDS, where it's possible to access database from VB.
Is this a good idea?
Bob
"Jeff Cochran" <je*********@zina.com> wrote in message
news:40****************@msnews.microsoft.com...
On Fri, 2 Jul 2004 19:07:21 +0200, "Bob" <sd***@no.az> wrote:

You're putting the business logic on the client side of the app when
you do this. There's nothing wrong with that, but as you've seen,
you're doing multiple queries of the database, then posting back to
the same form. Some of this could be encoded in the page logic, such
as which hours the courts are open on which days, or you could do an
initial select for all hours for the next 30 days and then display
them as available/unavailable in a DHTML page where you unhide
elements as others are selected (check a client side or DHTML group
for sample code here).

In essence though, you're doing a scheduling application. Take a look
at scheduling apps available on the web and see if they will fit your
needs, or what ideas they generate in your application. Aspin.com
would make a decent starting place.

Jeff

I have to make a web application in Javascript/ASP for tenniscourt
reservation (based on Access database). I would like to do everything withone page, because the user must be able to change his day, hour or
tenniscourt choice before really reserving it . I tried like this:

The first SELECT contains the date (next 30 days) and is filled dynamically.No problem.
When the date is chosen (by clicking), the second SELECT must appears withthe right opening hours (monday = 8 -18h, friday=8-16h etc ..). So i need aquery like "select mondayhour, tuesdayhour ... from daytable". This is noproblem because the code can be placed between <% %> just below the
first SELECT (set objdc = Server.CreateObject("ADODB.Connection" etc ..). Noform needed because no variable to pass to ASP.

My problem is when several tests must be done which require passing
variables to ASP.
Imagine that you can only reserve 2hours in a day. I need a query "select
count(hour) as tothour from reservation where day='" & dat & "' group by
logon having logon='" & login & "'" to check it. So i have to pass 'dat'
(chosen date) and 'login' (name of user) to ASP via a form that i submit tothis ASP file. The value of tothour can be returned by <%=tothour%> to theclient script.
Imagine you can maximum reserve 15 h in 30 days. Again a query "select
logon, count(hour) as tothour2 from reservation where cdate(day)> date()
group by logon having logon='" & login & "'" . Again a form to pass 'logon'and submit it to itself

If tothour <2, then the third SELECT must appear with the tenniscourt
numbers which are still available. I need another query like "select
tennisnr from reservation where cdate(day)='" & dat & "' and hour=" & hr
(hr=chosen hour). I need to pass "dat" and 'hr" to ASP. So i submit anotherform to ASP.
Etc ...

Is this way the right way to work? Does this not become very complicated andconfusing, also because when submitting the second form, the variable
passing through the first form are lost.

Thanks for any advice.
Bob

Jul 19 '05 #4
On Sat, 3 Jul 2004 10:38:15 +0200, "Bob" <sd***@no.az> wrote:
I read something about RDS, where it's possible to access database from VB.
Is this a good idea?
Only you can determine if it's good in your situation. It's not ASP
so you may want to try a VB group for advice.

Jeff
Bob
"Jeff Cochran" <je*********@zina.com> wrote in message
news:40****************@msnews.microsoft.com...
On Fri, 2 Jul 2004 19:07:21 +0200, "Bob" <sd***@no.az> wrote:

You're putting the business logic on the client side of the app when
you do this. There's nothing wrong with that, but as you've seen,
you're doing multiple queries of the database, then posting back to
the same form. Some of this could be encoded in the page logic, such
as which hours the courts are open on which days, or you could do an
initial select for all hours for the next 30 days and then display
them as available/unavailable in a DHTML page where you unhide
elements as others are selected (check a client side or DHTML group
for sample code here).

In essence though, you're doing a scheduling application. Take a look
at scheduling apps available on the web and see if they will fit your
needs, or what ideas they generate in your application. Aspin.com
would make a decent starting place.

Jeff

>I have to make a web application in Javascript/ASP for tenniscourt
>reservation (based on Access database). I would like to do everythingwith >one page, because the user must be able to change his day, hour or
>tenniscourt choice before really reserving it . I tried like this:
>
>The first SELECT contains the date (next 30 days) and is filleddynamically. >No problem.
>When the date is chosen (by clicking), the second SELECT must appearswith >the right opening hours (monday = 8 -18h, friday=8-16h etc ..). So i needa >query like "select mondayhour, tuesdayhour ... from daytable". This isno >problem because the code can be placed between <% %> just below the
>first SELECT (set objdc = Server.CreateObject("ADODB.Connection" etc ..).No >form needed because no variable to pass to ASP.
>
>My problem is when several tests must be done which require passing
>variables to ASP.
>Imagine that you can only reserve 2hours in a day. I need a query "select
>count(hour) as tothour from reservation where day='" & dat & "' group by
>logon having logon='" & login & "'" to check it. So i have to pass 'dat'
>(chosen date) and 'login' (name of user) to ASP via a form that i submitto >this ASP file. The value of tothour can be returned by <%=tothour%> tothe >client script.
>Imagine you can maximum reserve 15 h in 30 days. Again a query "select
>logon, count(hour) as tothour2 from reservation where cdate(day)> date()
>group by logon having logon='" & login & "'" . Again a form to pass'logon' >and submit it to itself
>
>If tothour <2, then the third SELECT must appear with the tenniscourt
>numbers which are still available. I need another query like "select
>tennisnr from reservation where cdate(day)='" & dat & "' and hour=" & hr
>(hr=chosen hour). I need to pass "dat" and 'hr" to ASP. So i submitanother >form to ASP.
>Etc ...
>
>Is this way the right way to work? Does this not become very complicatedand >confusing, also because when submitting the second form, the variable
>passing through the first form are lost.
>
>Thanks for any advice.
>Bob
>


Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Marquisha | last post by:
If this is off-topic, please forgive me. But I thought this might be the perfect spot to get some advice about how to proceed with a project. Working on a Web site design for a nonprofit...
1
by: Arun | last post by:
Hi..I am arun and Thanks to all of you in advance for solving my problem... I am working as a quality co-op for Maytag and I have developed a defect tracking database using access and VBA. It...
2
by: Brian Basquille | last post by:
Hello all. Air Hockey game is due up in just over a month. And i've about 2 and a half weeks to work on it. So, i need some feedback and advice. ...
15
by: vishsid3 | last post by:
Hi guys , I am new to this forum . can anybody plz tell me - "how can I run a c executable in some directory ,while the executable is in some other directory " I am new to unix and c ,so any...
39
by: Digital Puer | last post by:
I'm not the world's greatest C++ programmer, so I had a hard time with these. Some help would be appreciated. 1. Comment on the declaration of function Bar() below: class Foo { static int...
10
by: D | last post by:
Hi, I've written some C++ analysis / machine learning software which I think is pretty nifty. I am wondering what to do with it. I think it is worth some £, $ or euros. Also I wondering how to...
1
by: =?Utf-8?B?RW1tYSBIb3Bl?= | last post by:
Hi All, I need some advice please. I have very good knowledge of MS Access, Excel etc, reasonable knowledge of VBA and some very basic knowledge of VB6 and virtually non-existant knowledge of...
2
by: jon121970 | last post by:
I'm new here.. I am hoping to get some Professional Advice. I want to start my own online Auction. I anticipate it will grow into a high volume/high traffic online auction. I need some...
14
by: Byung-Hee HWANG | last post by:
Hi there, What is different between Ruby and Python? I am wondering what language is really mine for work. Somebody tell me Ruby is clean or Python is really easy! Anyway I will really make...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.