Wrox Programmer Forums
|
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 16th, 2005, 04:35 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, that, and the code that writes out the list with customers, so we can see what you pass in the querystring to the details page.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 16th, 2005, 04:56 AM
Authorized User
 
Join Date: Aug 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I see.

1st there is the list page.

Dim rsSearchResult
Dim rsSearchResult_numRows
Set rsSearchResult = Server.CreateObject("ADODB.Recordset")
rsSearchResult.ActiveConnection = MM_datab_STRING
rsSearchResult.Source =
"SELECT custname, town, description,
FROM seller
WHERE Selection LIKE '%" + Replace(rsList__MMColParam, "'", "''") + "%'
AND cattitle LIKE '%" + Replace(rsList__MMColParam2, "'", "''") + "%'
AND location LIKE '%" + Replace(rsList__MMColParam3, "'", "''") + "%'"
rssearchresult.CursorType = 0
rssearchresult.CursorLocation = 2
rssearchresult.LockType = 1
rssearchresult.Open()
rssearchresult_numRows = 0

Then the detail page

Dim rscustomerdetails
Dim rscustomerdetails_numRows
Set rscustomerdetails = Server.CreateObject("ADODB.Recordset")
rscustomerdetails.ActiveConnection = MM_datab_STRING
rscustomerdetails.Source = "SELECT * FROM seller"
rscustomerdetails.CursorType = 0
rscustomerdetails.CursorLocation = 2
rscustomerdetails.LockType = 1
rscustomerdetails.Open()
rscustomerdetails_numRows = 0

 
Old December 16th, 2005, 05:19 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Take a look at this:

rscustomerdetails.Source = "SELECT * FROM seller"


You don't have a WHERE clause to filter the customers recordset to exactly one.... Change the SQL statement so it has a WHERE clause that gets its value from the querystring.....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 16th, 2005, 06:16 AM
Authorized User
 
Join Date: Aug 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I see now. I included the WHERE clause and it worked.

Thank you.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Search box on a Database results page meichmann ASP.NET 2.0 Basics 3 April 2nd, 2008 10:25 AM
Easier page navigation of search results gs99 Forum and Wrox.com Feedback 0 February 2nd, 2007 09:38 PM
next and previous page results mikeuk PHP Databases 1 July 19th, 2004 05:15 AM
X Results per Page acdsky Classic ASP Databases 2 June 21st, 2004 10:38 AM
Results Page always returns '0 found' jonrayworth Dreamweaver (all versions) 4 November 9th, 2003 05:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.