Solved

database results refresh problem

Posted on 1998-08-04
13
125 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
 
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:Bing CISM / CISSP
ID: 1858825
Does the URL line of your browser contain all the search conditions while you perform a searching?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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:Bing CISM / CISSP
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 30 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now