|
 |
asp_databases thread: Re: Index Server - How do I avoid an error when only ignored words ar- e entered?
Message #1 by "vera voegele" <voegele@i...> on Tue, 20 Aug 2002 12:55:52
|
|
> Hi,
>
> If a user enters only noise/ignored words for their search phrase, I get
an
> ugly error saying:
>
> CreateRecordset error '80041605'
> The query contained only ignored words.
> /FSMA/results.asp, line 17
> I can't find any documentation covering this - I assume you have to check
> for the error occurring and then deal with it, but am unsure how to do
this.
> Is it an ADO error, a VBScript error or an IIS error I need to check for?
> Any help would be really appreciated,
> Colin
>
> ---
> Colin Montgomery
> Clifford Chance LLP
> Finance & Capital Markets (Lon)
> colin.montgomery@c...
> * +44 (0)20 7006 2503
> ---
>
>
>
> *******
>
> This message and any attachment are confidential and may be privileged
or otherwise protected from disclosure. If you are not the intended
recipient, please telephone or email the sender and delete this message
and any attachment from your system. If you are not the intended
recipient you must not copy this message or attachment or disclose the
contents to any other person.
>
> For further information about Clifford Chance please see our website at
http://www.cliffordchance.com or refer to any Clifford Chance office.
Message #2 by "vera voegele" <voegele@i...> on Tue, 20 Aug 2002 13:07:22
|
|
So far, I didn´t find any other solution then clearing the noise file, or
coding with "on error resume next".
That`s why, helped by colin, I solved the Problem like this:
------------------
' ErrorHandling / Ignored Words !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Err.Number = 0
on error resume next
' which file folder is searched ..
strSearch = "SELECT FileName FROM SCOPE('"" /xxxxx/documents""')
WHERE CONTAINS ('" & SearchStr & "')"
set rsSearch = idxConn.Execute(strSearch)
If Err.number <> 0 then
response.write "<span class =""error"">Error - you
searched for ignored words</span><br /><br />"
else
if not rsSearch.EOF then ' Documents found
aCounter = 0
'----- Writ Recordset in Array -----
Do While Not rsSearch.EOF
'write filename in Array
aDatName(aCounter) = rsSearch("filename")
rsSearch.MoveNext
aCounter = aCounter + 1
Loop
'----- Read Array -----
bCounter = aCounter - 1
for i = 0 to bCounter
Dim StringFullTextSearch
response.write(aDatName(i) & "<br />")
next
else
response.write "no documents found"
end if
end if
--------------------
Otherwsie, you can do this:
Clearing the noise File:
You find the Noise files regularly under WinNT\system32.
The Noise files are named "noise.xxx" , xxx is for example eng for the
British-English Noise File, deu for the German Noise File etc.
This file contains, by default, all the
words you would normally want to ignore, such as 'the', 'of' etc.
If you clear this file of all entries, there will be no ignored words, so
the CreateRecordset error '80041605' - The query contained only ignored
words - error will never occur.
HTH anyone
Vera
--
Dipl.-Ing. Vera Vögele
____________________________________
InterConnect
mailto:voegele@i...
http://www.interconnect.de
> If a user enters only noise/ignored words for their search phrase, I get
an
> ugly error saying:
>
> CreateRecordset error '80041605'
> The query contained only ignored words.
> /FSMA/results.asp, line 17
Message #3 by Colin.Montgomery@C... on Tue, 20 Aug 2002 13:09:34 +0100
|
|
Hi Vera, not sure if you got my reply to when you contacted me directly
about this posting, so here's a copy of it, for what it's worth (if anyone
can add to this, please do):
_______________________________________
Vera,
Sorry, but no, I didn't find a solution to this. Due to time constraints I
simply cleared the 'Noise' file. This file contains, by default, all the
words you would normally want to ignore, such as 'the', 'of' etc. If you
clear this file of all entries, there will be no ignored words, so the
CreateRecordset error '80041605' - The query contained only ignored words -
error will never occur.
If you want to pursue it further though, I reckon you could leave your noise
file as it is and code like the following:
err.number = 0
On Err0r Resume Next
'try to open the record5et using the search/indexing object
If err.Number <> 0 Then
Resp0nse.write "Only ignored words were contained in your query,
please "
Resp0nse.write "<a href='thisPage.asp'>try Again</a>"
Else
'continue with displaying results
End If
This is just quickly written code to give you an idea, so it's not been
tested etc. If you get this to work, maybe you'd be kind enough to post it
to the ASP_DATABASES forum list?
Hope this helps,
Col
-----Original Message-----
From: vera voegele [mailto:voegele@i...]
Sent: 20 August 2002 13:56
To: ASP Databases
Subject: [asp_databases] Re: Index Server - How do I avoid an error when
only ignored words ar- e entered?
> Hi,
>
> If a user enters only noise/ignored words for their search phrase, I get
an
> ugly error saying:
>
> CreateRecordset error '80041605'
> The query contained only ignored words.
> /FSMA/results.asp, line 17
> I can't find any documentation covering this - I assume you have to check
> for the error occurring and then deal with it, but am unsure how to do
this.
> Is it an ADO error, a VBScript error or an IIS error I need to check for?
> Any help would be really appreciated,
> Colin
*******
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the
intended recipient, please telephone or email the sender and delete this message and any attachment from your system. If you are
not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.
For further information about Clifford Chance please see our website at http://www.cliffordchance.com or refer to any Clifford
Chance office.
Message #4 by "vera voegele" <voegele@i...> on Tue, 20 Aug 2002 13:42:53
|
|
Hi Colin,
>Hi Vera, not sure if you got my reply to when you contacted me directly
>about this posting, so here's a copy of it, for what it's worth (if anyone
>can add to this, please do):
yes, I got your reply, and tried to reply ( only today ) several times.
But only the testmail succeeded.
Thank you very much for your mail, it was very helpful.
As you can see, I solved the Problem with "on error resume next" - like
you told me.
Thank you again for your fast help !
vera
PS: you should check your email-account.
My mailing failed several times because of this:
"the mail has been detected as containing VB Script.
Clifford Chance has an internal policy which prevents delivery
of the message......"
even if there was no Scripting-Code or any other code included - Only text.
|
|
 |