-
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="5" color="#FF00FF">
Sarasota Arts Council Events for <%=request.form("categories"%></font></b>
<%strcat = request.form("Categories"%>
</CENTER>
<p align="left"><a href="getevents5.asp">Back to Previous Page</a></p>
<Center>
<%
dbunit = 1
strcat = request.form("Categories"
Set MyDb = Server.CreateObject("ASPdb.Free" ' Create the ASP-db™ object
MyDb.dbMDB = Server.MapPath("saraarts.mdb" ' Use YourFile.mdb in the current directory
MyDb.dbColor = "6" ' Pick color scheme 7, turn on Color button
MyDb.dbMode = "grid,auto" ' Show it in both "grid" and "form" mode
MyDb.dbGridTableTag = "BORDER=3" ' Set the table BORDER to 3
MyDb.dbSQL = "Select program, description, event_start_date, event_end_date, event_time_1, performance_location, image FROM events where Discipline = '" & trim(strcat) & "' "
MyDb.ASPdbFree ' Tell ASP-db to show the table!
%>
</CENTER>
</BODY>
</HTML>
-
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
"re-runs" and the second time, request.form("Categories" 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'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="5" color="#FF00FF">
Sarasota Arts Council Events for <%=request.form("categories"%></font></b>
<%strcat = request.form("Categories"%>
</CENTER>
<p align="left"><a href="getevents5.asp">Back to Previous Page</a></p>
<Center>
<%
dbunit = 1
strcat = request.form("Categories"
Set MyDb = Server.CreateObject("ASPdb.Free" ' Create the ASP-db™ object
MyDb.dbMDB = Server.MapPath("saraarts.mdb" ' Use YourFile.mdb in the current directory
MyDb.dbColor = "6" ' Pick color scheme 7, turn on Color button
MyDb.dbMode = "grid,auto" ' Show it in both "grid" and "form" mode
MyDb.dbGridTableTag = "BORDER=3" ' Set the table BORDER to 3
MyDb.dbSQL = "Select program, description, event_start_date, event_end_date, event_time_1, performance_location, image FROM events where Discipline = '" & trim(strcat) & "' "
MyDb.ASPdbFree ' 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
-
Forum Rules
|
|