12 Years
Discussion Span
Last Post by Grumblybum

Hi , I am 1st time in this forum. i need to do a search using asp . The search result will return the keyword match percentage with the word in database. example: http://www.newport.com/searchresults.aspx?lang%20=1033&searchfor=3679%20Mirror%20Mounts%20Opto-Mechanics

i am running out of time and still cannot find any resources on the web. Does anyone know how to do this and maybe can provide me some resources. Thanks a lot....

I have never done this but..

If you do a quick reccord count and store it in a variable,
Dim mySQL
mySQL = "Select Count(*) AS myTotal FROM yourdata"
Dim myRS
Set myRS = Server.CreateObject("ADODB.RecordSet")
myRS.Open mySQL, myConn
Record_size = myRS("myTotal")

and then code your search to return the number of records,
Dim iRecordCount
iRecordCount = objPagingRS.RecordCount

Then simple math equasion with your variables should give you the percentage

BTW the database search samples at http://www.asp101.com/ have some very well commented scripts that do this sort of thing



This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.