Re: "On Error Resume Next" in SQL Server

From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 02/07/05


Date: Mon, 7 Feb 2005 08:01:40 -0500

No idea, as I don't use full text search at all. However, if the
formatSearchText can output stuff to cause it to fail, is this text
something that would obviously make it fail? Such that you could clean it
up in the UDF? Hopefully someone else who has used full text search can see
the problem with it. Maybe posting some of the values that cause it to
fail?

Sorry I am not much help on this subject.

-- 
----------------------------------------------------------------------------
Louis Davidson - drsql@hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design - 
http://www.apress.com/book/bookDisplay.html?bID=266
Blog - http://spaces.msn.com/members/drsql/
Note: Please reply to the newsgroups only unless you are interested in 
consulting services.  All other replies may be ignored :)
"Andy Wakeling" <anonymous@discussions.microsoft.com> wrote in message 
news:21c301c50cff$5894aea0$a401280a@phx.gbl...
> Louis,
> I won't post the actual code as it is a massive SP and
> besides, we've tried various tests in QA as well but the
> gist is as follows:
>
> DECLARE TestCursor CURSOR FOR /*WHATEVER*/
> OPEN TestCursor
> WHILE (1 = 1)
> BEGIN
> FETCH NEXT FROM TestCursor INTO @SearchText
> SET @SearchText = FormatSearchText(@SearchText)
> /*
> This is a UDF with output as per KB article as mentioned.
> If anything goes wrong this returns '' as I am not
> bothered if it cannot resolve input but note: This can
> still output junk that can break the CONTAINS search.
> */
>
> INSERT INTO #TEMPTABLE SELECT /*WHATEVER FROM WHEREVER*/
> WHERE CONTAINS(/*SEARCHFIELD*/,  @SearchText)
> /*
> When run in QA, if this query causes an ignored-word error
> the SP stops dead. I need it to carry on to the end of the
> cursor.
> */
>
> END, CLOSE, DEALLOCATE etc.
>
> SELECT * FROM #TEMPTABLE /* Output of entire cursor */
>
> That's pretty much what I'm trying to achieve. What do you
> reckon?
>
> Cheers
> Andy
>
>
>>-----Original Message-----
>>When you are running your query in query analyzer, does
> it stop running?  If
>>so, then please post the code.  If it doesn't, then it is
> your code that is
>>causing it to stop.  Just have your calling code ignore
> the errors and
>>continue on.
>>
>>-- 
>>----------------------------------------------------------
> ------------------
>>Louis Davidson - drsql@hotmail.com
>>SQL Server MVP
>>
>>Compass Technology Management - www.compass.net
>>Pro SQL Server 2000 Database Design -
>>http://www.apress.com/book/bookDisplay.html?bID=266
>>Blog - http://spaces.msn.com/members/drsql/
>>Note: Please reply to the newsgroups only unless you are
> interested in
>>consulting services.  All other replies may be ignored :)
>>"Andy Wakeling" <anonymous@discussions.microsoft.com>
> wrote in message
>>news:203501c50ad3$6ee202d0$a601280a@phx.gbl...
>>>I am executing a stored procedure that uses a cursor to
> do
>>> a CONTAINS search for each record and to produce a
> result
>>> set from that for output. The trouble is that if a good
>>> old "ignored words" error occurs for one of the records
>>> the procedure stops running. I need this to carry on
>>> running regardless of this as the only reason an error
>>> would occur would be due to bad user input which does
> not
>>> bother me and can therefore be "ignored".
>>>
>>> I have followed the advice in the KB article at
>>> http://support.microsoft.com/default.aspx?scid=kb;en-
>>> us;246800 for formatting input for CONTAINS searches but
>>> there is always some nasty ASCII/UNICODE character that
>>> slips through.
>>>
>>> Is there a method to isolate the full-text search (or
> any
>>> part of the procedure for that matter) and to guarantee
>>> that my stored procedure will run to the end of the
> cursor?
>>>
>>> Any help would be much appreciated.
>>
>>
>>.
>> 


Relevant Pages

  • Re: Error adding command properties for stored procedure call
    ... I see you are using the SQL Native Client for SQL Server ... A server cursor is not allowed on a remote stored procedure or stored ... The stored procedure called is a test one that simply SELECTs the name field ... int InitializeAndConnect; ...
    (microsoft.public.data.oledb)
  • Stored procedure does not complete until result set is retrieved from ODBC
    ... I have a SQL Server Stored procedure that I am executing via ODBC. ... -- Start Code without cursor ...
    (microsoft.public.sqlserver.odbc)
  • Re: Error adding command properties for stored procedure call
    ... Microsoft OLE DB Provider for SQL Server ... properties to the command the execute call attempts to create a cursor. ... A server cursor is not allowed on a remote stored procedure or stored ...
    (microsoft.public.data.oledb)
  • Re: noise words, @@ERROR, and stop and resume indexing
    ... Could you re-post your SQL script with the cursor code? ... >>Create table Noise ... >>Looking for a SQL Server replication book? ... >>> 1) check noise words inside stored procedure ...
    (microsoft.public.sqlserver.fulltext)
  • Re: ADO and DELETE Statement
    ... The receipt won't be sent twice as you check for its existence. ... You need to get to the bottom of why a small % of deletes fail. ... receiving software which allows warehouse employeed to scan item ... valid case and I am picking up those additional scans from SQL Server ...
    (microsoft.public.data.ado)

Loading