Results 1 to 2 of 2

Thread: Navigation Buttons problem

  1. #1
    Barry Passen Guest

    Navigation Buttons problem

    Hello,
    I've just downloaded the ASPDB-Free product to evaluate for a client prior to purchasing the Pro version.
    I substituted my database in the Testasp.asp document and it worked great. The navigation performed just perfectly.
    WHen I add our own Sql criteria which consisted of only one test field, It found all 321 records and displayed the first five just fine. However, now the navigation buttons don't work and take me to the top of the Testasp.asp form and blanks it out when I press it.
    I know this must be a simple misunderstanding on my part, however, I can't find out how to correct this problem. Can someone please take a look at this code and tell me how to fix this problem?

    Thanks in advance.

    Barry Passen

    HTML>
    <BODY>
    <CENTER>
    <b><font size=&#34;5&#34; color=&#34;#FF00FF&#34;>
    Sarasota Arts Council Events for <%=request.form(&#34;categories&#34%></font></b>
    <%strcat = request.form(&#34;Categories&#34%>
    </CENTER>
    <p align=&#34;left&#34;><a href=&#34;getevents5.asp&#34;>Back to Previous Page</a></p>

    <Center>
    <%
    dbunit = 1
    strcat = request.form(&#34;Categories&#34

    Set MyDb = Server.CreateObject(&#34;ASPdb.Free&#34 &#39; Create the ASP-db™ object
    MyDb.dbMDB = Server.MapPath(&#34;saraarts.mdb&#34 &#39; Use YourFile.mdb in the current directory
    MyDb.dbColor = &#34;6&#34; &#39; Pick color scheme 7, turn on Color button
    MyDb.dbMode = &#34;grid,auto&#34; &#39; Show it in both &#34;grid&#34; and &#34;form&#34; mode
    MyDb.dbGridTableTag = &#34;BORDER=3&#34; &#39; Set the table BORDER to 3
    MyDb.dbSQL = &#34;Select program, description, event_start_date, event_end_date, event_time_1, performance_location, image FROM events where Discipline = &#39;&#34; & trim(strcat) & &#34;&#39; &#34;
    MyDb.ASPdbFree &#39; Tell ASP-db to show the table!
    %>
    </CENTER>

    </BODY>
    </HTML>


  2. #2
    Mark Guest

    Navigation Buttons - dbReset needed - Session vars

    Hi Barry,

    Two problems ...

    1) Be sure you use a unique dbUnit number for every page that you run.
    If the test program used 1, change it to 2 for YOUR new program.

    2) The big problem is that when you click a nav button, the asp program
    &#34;re-runs&#34; and the second time, request.form(&#34;Categories&#34 comes back
    null. This goofs up your WHERE clause. You MUST save the request.form the
    first time it runs, then pull it out of memory the next time(s) it runs.
    See Programming Examples D5a-D5g for examples on the correct technique.
    Note: When you pass a variable to a WHERE clause, you will also need to
    do a dbReset whenever that WHERE clause changes. Again, see D5a-D5g.

    I hope this helps.

    Mark.



    ------------
    Barry Passen at 10/24/99 5:05:11 PM

    Hello,
    I&#39;ve just downloaded the ASPDB-Free product to evaluate for a client prior to purchasing the Pro version.
    I substituted my database in the Testasp.asp document and it worked great. The navigation performed just perfectly.
    WHen I add our own Sql criteria which consisted of only one test field, It found all 321 records and displayed the first five just fine. However, now the navigation buttons don&#39;t work and take me to the top of the Testasp.asp form and blanks it out when I press it.
    I know this must be a simple misunderstanding on my part, however, I can&#39;t find out how to correct this problem. Can someone please take a look at this code and tell me how to fix this problem?

    Thanks in advance.

    Barry Passen

    HTML>
    <BODY>
    <CENTER>
    <b><font size=&#34;5&#34; color=&#34;#FF00FF&#34;>
    Sarasota Arts Council Events for <%=request.form(&#34;categories&#34%></font></b>
    <%strcat = request.form(&#34;Categories&#34%>
    </CENTER>
    <p align=&#34;left&#34;><a href=&#34;getevents5.asp&#34;>Back to Previous Page</a></p>

    <Center>
    <%
    dbunit = 1
    strcat = request.form(&#34;Categories&#34

    Set MyDb = Server.CreateObject(&#34;ASPdb.Free&#34 &#39; Create the ASP-db™ object
    MyDb.dbMDB = Server.MapPath(&#34;saraarts.mdb&#34 &#39; Use YourFile.mdb in the current directory
    MyDb.dbColor = &#34;6&#34; &#39; Pick color scheme 7, turn on Color button
    MyDb.dbMode = &#34;grid,auto&#34; &#39; Show it in both &#34;grid&#34; and &#34;form&#34; mode
    MyDb.dbGridTableTag = &#34;BORDER=3&#34; &#39; Set the table BORDER to 3
    MyDb.dbSQL = &#34;Select program, description, event_start_date, event_end_date, event_time_1, performance_location, image FROM events where Discipline = &#39;&#34; & trim(strcat) & &#34;&#39; &#34;
    MyDb.ASPdbFree &#39; Tell ASP-db to show the table!
    %>
    </CENTER>

    </BODY>
    </HTML>


Posting Permissions

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