Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

database results refresh problem

Posted on 1998-08-04
13
Medium Priority
?
132 Views
Last Modified: 2013-12-25
I have a search form which returns records from a  database. If I refresh the results page the criteria for the search are lost and the page displays every record in the database. Any fixes on this one?
NM
0
Comment
Question by:englishman
  • 7
  • 2
  • 2
  • +2
13 Comments
 
LVL 1

Expert Comment

by:davejenkins
ID: 1858820
How is the page being built?  With a CGI script?  Are you POSTing or GETting the data?  Please give us some more info . . .
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 1858821
Save the search criteria in hiden fields and when you refresh the page, pass those hidden fields back as parameters.

<INPUT TYPE=HIDDEN NAME=Param1 VALUE="search text1">
etc...

- Matt
0
 
LVL 2

Author Comment

by:englishman
ID: 1858822
Hi,
searchform includes:

<form method="POST" action="librarysearch.asp">
  <p><strong>Keywords:</strong> <input type="text" name="KeywordEntry" size="20"></p>
  <p><strong>And:</strong> <input type="text" name="KeywordEntry1" size="20"></p>
  <p><br>
  <input type="submit" value="Search" name="B1" style="color: rgb(0,128,128)"><input
  type="reset" value="Reset" name="B2"></p>


answer page includes:

 <!--webbot bot="DatabaseRegionStart" startspan s-columnnames="Authors,Date,Keywords"
  s-connstring="DSN=crtintlib" b-tableformat="TRUE"
  s-sql="SELECT Keywords, Authors, Date FROM library WHERE (library.Keywords like  '%%%KeywordEntry%%%' AND library.Keywords   like  '%%%KeywordEntry1%%%')"
  local_preview="&lt;tr&gt;&lt;td colspan=6 bgcolor=&quot;#FFFF00&quot; align=&quot;center&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt; Database Regions do not preview unless this page is fetched from a Web server using a web browser.  The following table will display one row for each query result row when the page is fetched from a Web server.&lt;/td&gt;&lt;/tr&gt;"
  preview clientside s-DefaultFields s-NoRecordsFound="No Records Returned" i-MaxRecords
  i-ScriptTimeout tag="BODY" s-Password --><%
' Substitute in form parameters into the query string
fp_sQry = "SELECT Keywords, Authors, Date FROM library WHERE (library.Keywords like  '%%%KeywordEntry%%%' AND library.Keywords   like  '%%%KeywordEntry1%%%')"
fp_sDefault = ""
fp_sNoRecords = "No Records Returned"
fp_iMaxRecords = 0
fp_iTimeout = 0
fp_iCurrent = 1

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 2

Author Comment

by:englishman
ID: 1858823
Hi,
searchform includes:

<form method="POST" action="librarysearch.asp">
  <p><strong>Keywords:</strong> <input type="text" name="KeywordEntry" size="20"></p>
  <p><strong>And:</strong> <input type="text" name="KeywordEntry1" size="20"></p>
  <p><br>
  <input type="submit" value="Search" name="B1" style="color: rgb(0,128,128)"><input
  type="reset" value="Reset" name="B2"></p>


answer page includes:

 <!--webbot bot="DatabaseRegionStart" startspan s-columnnames="Authors,Date,Keywords"
  s-connstring="DSN=crtintlib" b-tableformat="TRUE"
  s-sql="SELECT Keywords, Authors, Date FROM library WHERE (library.Keywords like  '%%%KeywordEntry%%%' AND library.Keywords   like  '%%%KeywordEntry1%%%')"
  local_preview="&lt;tr&gt;&lt;td colspan=6 bgcolor=&quot;#FFFF00&quot; align=&quot;center&quot; width=&quot;100%&quot;&gt;&lt;font color=&quot;#000000&quot;&gt; Database Regions do not preview unless this page is fetched from a Web server using a web browser.  The following table will display one row for each query result row when the page is fetched from a Web server.&lt;/td&gt;&lt;/tr&gt;"
  preview clientside s-DefaultFields s-NoRecordsFound="No Records Returned" i-MaxRecords
  i-ScriptTimeout tag="BODY" s-Password --><%
' Substitute in form parameters into the query string
fp_sQry = "SELECT Keywords, Authors, Date FROM library WHERE (library.Keywords like  '%%%KeywordEntry%%%' AND library.Keywords   like  '%%%KeywordEntry1%%%')"
fp_sDefault = ""
fp_sNoRecords = "No Records Returned"
fp_iMaxRecords = 0
fp_iTimeout = 0
fp_iCurrent = 1

0
 
LVL 2

Author Comment

by:englishman
ID: 1858824
Frontpage as you see, sorry about 2*post

0
 
LVL 37

Expert Comment

by:bbao
ID: 1858825
Does the URL line of your browser contain all the search conditions while you perform a searching?
0
 
LVL 2

Author Comment

by:englishman
ID: 1858826
no search conditions in the URL
0
 
LVL 2

Expert Comment

by:Wiz_of_Oz
ID: 1858827
what technology r u using to access the db?
0
 
LVL 2

Author Comment

by:englishman
ID: 1858828
asp frontpage sql
0
 
LVL 37

Expert Comment

by:bbao
ID: 1858829
Since no search conditions in the URL, so as you refresh the content, browser send same URL to server again, the server cannot do same searching with proper conditions you want, then the result cannot be given as you like.
0
 
LVL 10

Accepted Solution

by:
MasseyM earned 60 total points
ID: 1858830
Why did you reject my answer from before?

0
 
LVL 2

Author Comment

by:englishman
ID: 1858831
Sorry Matt, I thought I'd got locked into talk with someone who said I couldn't do it.
Your answer is what I'm looking for.
Unfortunately I am new to coding and need to be a little more spoon fed.
How do I do this? -
NM

0
 
LVL 2

Author Comment

by:englishman
ID: 1858832
Sorry Matt, I thought I'd got locked into talk with someone who said I couldn't do it.
      Your answer is what I'm looking for.
      Unfortunately I am new to coding and need to be a little more spoon fed.
      How do I do this? -
      NM
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question