By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,223 Members | 1,371 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,223 IT Pros & Developers. It's quick & easy.

is aspnet what i need here?

P: n/a
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.
Can ASP.net do more?

Thanks for any advice.
Bob

Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
If I was doing this in asp.net, I'd use CustomValidators for all these
"rules". As far as complicated SQL queries based on their current
selections, asp.net isn't going to help you much here, sql is sql..

"Bob" <sd***@no.az> wrote in message
news:u8**************@TK2MSFTNGP10.phx.gbl...
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.
Can ASP.net do more?

Thanks for any advice.
Bob

Nov 18 '05 #2

P: n/a
The problem with custom validator controls is that they are quite difficult
to program them the way you want.

It seems at first read, that a large part of your question concerns how to
get the data that you are actually interested in.

Once you have the data you need, it is relatively easy to display it anyway
you like. I would go as how to get your data in the Access newsgroup, then
come back here if you need to

Simon
Nov 18 '05 #3

P: n/a
> 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.
Can ASP.net do more?
ASP and ASP.Net both do essentially the same thing in 2 different ways. They
handle HTTP Requests for certain types of documents (.asp or .aspx), and
return HTML documents. ASP is procedural in nature. ASP.Net is
object-oriented. ASP requires COM to do the heavy lifting. ASP.Net does not.

Your'e still working in a stateless environment (HTTP). Each model handles
this in a different way. And you still have a lot of business logic to
write.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Bob" <sd***@no.az> wrote in message
news:u8**************@TK2MSFTNGP10.phx.gbl... 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.
Can ASP.net do more?

Thanks for any advice.
Bob

Nov 18 '05 #4

P: n/a
> 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.
Can ASP.net do more?
ASP and ASP.Net both do essentially the same thing in 2 different ways. They
handle HTTP Requests for certain types of documents (.asp or .aspx), and
return HTML documents. ASP is procedural in nature. ASP.Net is
object-oriented. ASP requires COM to do the heavy lifting. ASP.Net does not.

Your'e still working in a stateless environment (HTTP). Each model handles
this in a different way. And you still have a lot of business logic to
write.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Bob" <sd***@no.az> wrote in message
news:u8**************@TK2MSFTNGP10.phx.gbl... 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.
Can ASP.net do more?

Thanks for any advice.
Bob

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.