Forum Moderators: open
I'm new to these forums so I apologise if I have put this in the wrong place. I am also new to ASP and to using the Index Server that comes with IIS, so please dumb down any responses you might have. :)
Anyway, I am trying to create a search page for a client using Index Server and when testing out my page I get an error message that says:
error '80040e14'
/search1.asp, line 277
Line 277 of my page is the following:
objRS.Open strSQL,"PROVIDER=MSIDXS;DATA SOURCE=" & strDataSource
I have no idea what any of that does, I just followed the tutorial [support.microsoft.com] from the MS website. Is there anything in that that looks out of place? Can anyone please help me?
Thanks in advance.
SELECT Rank, DocTitle, HitCount, Characterization, VPath FROM SCOPE() WHERE ((N/A LIKE '%N/A%') AND WHERE ((N/A LIKE '%N/A%') AND WHERE ((N/A LIKE '%N/A%') AND WHERE ((N/A LIKE '%N/A%') AND WHERE ((N/A LIKE '%N/A%') AND ((VPath NOT LIKE '%/_vti%') AND (VPath NOT LIKE '%/_private%')))
The sql statement I have written is:
strSQL = "SELECT " & strDisplayFields & " FROM SCOPE() " & _
"WHERE ((" & strQueryGen & " LIKE '%" & strQueryDish & "%') AND " & _
"WHERE ((" & strQueryLoc & " LIKE '%" & strQueryView & "%') AND " & _
"WHERE ((" & strQueryDin & " LIKE '%" & strQueryMus & "%') AND " & _
"WHERE ((" & strQueryOther & " LIKE '%" & strQueryPRange & "%') AND " & _
"WHERE ((" & strQueryLic & " LIKE '%" & strQueryAcc & "%') AND " & _
"((VPath NOT LIKE '%/_vti%') AND (VPath NOT LIKE '%/_private%')))"
And I must admit I have no idea if I've done that right because the tutorial [support.microsoft.com] I was following only had two options for the user to select from, whereas I have ten, so that is probably where the problem lies.
Go into the computer management mmc and locate Indexing Service under services and applications. Click on your catalog that you've built and then on the right panel click 'query the catalog' to see if its working. Search for a vowel...
strSQL = "SELECT " & strDisplayFields & " FROM SCOPE() " & _
"WHERE ((" & strQueryGen & " LIKE '%" & strQueryDish & "%') AND " & _
"WHERE ((" & strQueryLoc & " LIKE '%" & strQueryView & "%') AND " & _
"WHERE ((" & strQueryDin & " LIKE '%" & strQueryMus & "%') AND " & _
"WHERE ((" & strQueryOther & " LIKE '%" & strQueryPRange & "%') AND " & _
"WHERE ((" & strQueryLic & " LIKE '%" & strQueryAcc & "%') AND " & _
"((VPath NOT LIKE '%/_vti%') AND (VPath NOT LIKE '%/_private%')))"
Try this:
strSQL = "SELECT " & strDisplayFields & " FROM SCOPE() " & _
"WHERE ((" & strQueryGen & " LIKE '%" & strQueryDish & "%') AND " & _
" ((" & strQueryLoc & " LIKE '%" & strQueryView & "%') AND " & _
" ((" & strQueryDin & " LIKE '%" & strQueryMus & "%') AND " & _
" ((" & strQueryOther & " LIKE '%" & strQueryPRange & "%') AND " & _
" ((" & strQueryLic & " LIKE '%" & strQueryAcc & "%') AND " & _
"((VPath NOT LIKE '%/_vti%') AND (VPath NOT LIKE '%/_private%')))"
Edit:Here's a query that I have running in one of my systems...
strSQL = "SELECT " & strDisplayFields & " " & _
"FROM SCOPE() " & _
"WHERE FREETEXT ('" & strQueryText & "') AND " & _
"VPath NOT LIKE '%\_vti%' AND VPath NOT LIKE '%\_private%' " & _
"AND VPath NOT LIKE '%aspnet_client%' " & _
"AND VPath NOT LIKE '%images%' " & _
"AND VPath NOT LIKE '%include%' " & _
"AND FileName NOT LIKE '%.asp%' " & _
"AND FileName NOT LIKE '%.asa%'" & _
"AND FileName NOT LIKE '%.css%'" & _
"AND FileName NOT LIKE '%.js%'" & _
"AND FileName NOT LIKE '%.scc%'" & _
"ORDER BY Rank DESC"
"What are you passing for the datasource? That maps to a valid DSN on the machine?"
This is the only other line of code mentioning the datasource, is this what you are referring to:
Const strDataSource = "mainmenu"?