Forum Moderators: open

Message Too Old, No Replies

Error "80040e14" message

ASP and Index Server

         

GloomCookie

7:51 am on Sep 20, 2005 (gmt 0)

10+ Year Member



Hi,

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.

mrMister

12:10 pm on Sep 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We need to see the SQL before we can help you

In the line before the error, type the following

Response.write(strSQL)
Response.end

Then post here what it says

GloomCookie

2:14 am on Sep 21, 2005 (gmt 0)

10+ Year Member



I hope this is what you mean:

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.

GloomCookie

2:35 am on Sep 23, 2005 (gmt 0)

10+ Year Member



Can someone please help me with the above code? Why isn't it working? Have I written it out wrong? Please help.

Easy_Coder

4:00 am on Sep 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is the Index Populated? I've had trouble getting it working without first rebooting the machine after building the index the first time. the index build can take a little time too.

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...

GloomCookie

4:19 am on Sep 23, 2005 (gmt 0)

10+ Year Member



Everything on that end works fine, it's just that sql statement that is giving me the error message, and I don't know what is wrong with it to fix it.

But thanks for the suggestion though.

Easy_Coder

10:17 am on Sep 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, then your index is full. What are you passing for the datasource? That maps to a valid DSN on the machine?

Easy_Coder

12:48 pm on Sep 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Oh, you only need 1 where clause and this code has 5:

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"

GloomCookie

7:24 am on Sep 29, 2005 (gmt 0)

10+ Year Member



Easy_Coder, I changed the clause as you suggested, but I am still getting the same error message on that line. I am unsure what you mean by this though:

"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"?

topr8

7:29 am on Sep 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>>What are you passing for the datasource?

use are trying to use a DSN (data source name) this has to be set on the server, have you done this?

GloomCookie

7:45 am on Sep 29, 2005 (gmt 0)

10+ Year Member



It doesn't look like it. I was sure I had. Can you please remind me how to do this and what I need to put in there?

topr8

9:05 am on Sep 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



if this is your own computer then

control panel >> administrative tools >> data sources

and follow the wizard

if this is on a remote webserver you'll either have to ask your web host to do it or there should be some way of doing it using your admin area.