You have a current application written in Classic ASP, and you want to add to it?
Where do you want the search button, and how do you want the results displayed?
If you already have an ASP app set up, you can use the same connection object and just make a recordset that runs your query.
I can give you example code from Northwind if you like, but I need to know how you want it displayed. ASP.NET has neat things like a datagrid, Classic ASP you have to do it all yourself.
If you have Dreamweaver, it can make Classic ASP coding a lot easier.
nikkiH
Junior Poster in Training
79 posts since Dec 2006
Reputation Points: 13
Solved Threads: 4
Your best bet would be to post it back to itself with a hidden variable, or to post it to a brand new page. When you do, post it to like:
/search.asp?query=SearchText
Then pull the querystring by typing:
Dim strQuery = Request.QueryString("query")
Put that into the SQL statement as follows:
SELECT * FROM Database WHERE fieldtocheck LIKE '%" & strQuery & "%' ORDER BY Date DESC"
Then store the information into an array with getrows for speed:
arrResult = rs.GetRows() 'retrieves all rows, or specify for certain numer like rs.GetRows(25) for 25 results
Then display them below like this:
recMax = UBound( arrResult1, 2 )
For rec = 0 to recMax
'Do coding here
Result 1: <%= rs.fields("equipment") %>
Next
This simply pulls the information from the database and stores it into an array from getrows (which is very fast), then spits it out into tables. The tables only display the equipment field. Edit as needed.
SheSaidImaPregy
Veteran Poster
1,080 posts since Sep 2007
Reputation Points: 43
Solved Threads: 68