Solved

database results refresh problem

Posted on 1998-08-04
13
129 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
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 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

752 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