Advertisement

03.23.2005 at 02:22PM PST, ID: 21362526
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Allow user to select the search result to see details for the item

Asked by dcgimo in Active Server Pages (ASP)

Tags: ,

Hi All,

I have a search page that returns results from a sql server database.  I would like the results to be similar to a listbox, allowing the user to select the result they want when multiple results are retuned and see the details in a seperate page.  How can I allow the user to step through the results, select the item they want and open the detailed results in another window?  Below is the code I am using to search the dataset and return the possible results.  Thanks!

<%
Dim strURL    
Dim strConnect
Dim rstSearch  
Dim strDBPath
Dim strSQL    
Dim strSearch

strURL = Request.ServerVariables("URL")
strSearch = Request.QueryString("search")

%>
<p>Search by Parcel Number, Name or Address</p>
<form action="<%= strURL %>" method="get">
<input name="search" value="<%= strSearch %>" size="20" />
<input type="submit" />
</form>
<%
If strSearch <> "" Then
            strDBPath = Server.MapPath("database.mdb")
                      Set strConnect = Server.CreateObject("ADODB.Connection")
strConnect.Open "Provider=SQLOLEDB; DRIVER=SQLServer; SERVER=na; UID=na; PWD=na; DATABASE=na;"

strSQL = "SELECT distinct last_name, first_name, parcel_number, py_tax_code, house_number, house_number_suffix, prefix_directional, street_name, street_suffix, post_directional, community_name, state, zip_code, gross_current_acres " _
            & "FROM taxquerysystem " _
            & "WHERE last_name LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
            & "OR first_name LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
            & "OR parcel_number LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
            & "OR house_number + street_name LIKE '%" & Replace(strSearch, "'", "''") & "%' " _
            & "ORDER BY last_name;"

Set rstSearch = strConnect.Execute(strSQL)

%>
      <table border="1" bordercolorlight="#AAAAAA" bordercolordark="#919191">
      <%
      Do While Not rstSearch.EOF
            %>
            <tr>
            <td><%= rstSearch.Fields("parcel_number").Value %>&nbsp;</td>
            <td><%= rstSearch.Fields("first_name").Value %>&nbsp;<%= rstSearch.Fields("last_name").Value %></td>
            <td><%= rstSearch.Fields("py_tax_code").Value %>&nbsp;</td>
            <td><%= rstSearch.Fields("house_number").Value %>&nbsp;<%= rstSearch.Fields("house_number_suffix").Value %>&nbsp;<%= rstSearch.Fields("prefix_directional").Value %>&nbsp;<%= rstSearch.Fields("street_name").Value %>&nbsp;<%= rstSearch.Fields("street_suffix").Value %>&nbsp;<%= rstSearch.Fields("post_directional").Value %>&nbsp;<%= rstSearch.Fields("community_name").Value %>&nbsp;<%= rstSearch.Fields("state").Value %>&nbsp;<%= rstSearch.Fields("zip_code").Value %></td>
            <td><%= rstSearch.Fields("gross_current_acres").Value %>&nbsp;</td>

            </tr>
            <%

            rstSearch.MoveNext
      Loop
      %>
      </table>
      <%
      rstSearch.Close
      Set rstSearch = Nothing
      strConnect.Close
      Set strConnect = Nothing
End If

%>
</BODY>
</HTML>
Start Free Trial
 
Loading Advertisement...
 
[+][-]03.23.2005 at 02:56PM PST, ID: 13616996

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.23.2005 at 03:45PM PST, ID: 13617373

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.23.2005 at 03:57PM PST, ID: 13617434

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: allow, select
Sign Up Now!
Solution Provided By: Hecatonchires
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.23.2005 at 03:58PM PST, ID: 13617445

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.23.2005 at 05:49PM PST, ID: 13618130

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.23.2005 at 06:05PM PST, ID: 13618211

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]03.24.2005 at 06:53AM PST, ID: 13622148

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.28.2005 at 03:35PM PST, ID: 13648155

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32