Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default some advice please

    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


    Bob Guest

  2. Similar Questions and Discussions

    1. Advice
      Hello All, I am looking for advice on the purchase of a digital camera. I will be using it primarily for personal photos, and to e-mail shots...
    2. Help and Advice
      Hi, I have a dynamic menu in my Intranet application that loads from a database. What I would like to do is to make parent nodes visible based on...
    3. A bit of advice!
      Hi guys, im kinda new to this forum stuff, and i was wondering if anyone could help me out. I'm using 3d Studio Max 5 and Director MX for a...
    4. asking for advice on b/w
      In article <FerMa.13100$fG.7214@sccrnsc01>, "Greg Arendall" <garendall@mchsi.com> wrote: Maybe Tri-X? -Ben Abzug
    5. Need advice
      Hi I am in the process of "beautifying" a web site based on PHP + XTemplate. I wish to include a fixed left navigation bar on almost all the pages....
  3. #2

    Default Re: some advice please

    On Fri, 2 Jul 2004 19:07:21 +0200, "Bob" <sdssd@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
    >
    Jeff Cochran Guest

  4. #3

    Default Re: some advice please

    Thanks

    "Jeff Cochran" <jeff.nospam@zina.com> wrote in message
    news:40e5bd78.629952824@msnews.microsoft.com...
    > On Fri, 2 Jul 2004 19:07:21 +0200, "Bob" <sdssd@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
    > >
    >

    Bob Guest

  5. #4

    Default Re: some advice please

    I read something about RDS, where it's possible to access database from VB.
    Is this a good idea?
    Bob
    "Jeff Cochran" <jeff.nospam@zina.com> wrote in message
    news:40e5bd78.629952824@msnews.microsoft.com...
    > On Fri, 2 Jul 2004 19:07:21 +0200, "Bob" <sdssd@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
    > >
    >

    Bob Guest

  6. #5

    Default Re: some advice please

    On Sat, 3 Jul 2004 10:38:15 +0200, "Bob" <sdssd@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" <jeff.nospam@zina.com> wrote in message
    >news:40e5bd78.629952824@msnews.microsoft.com...
    >> On Fri, 2 Jul 2004 19:07:21 +0200, "Bob" <sdssd@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
    >> >
    >>
    >
    Jeff Cochran Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139