You are currently offline, waiting for your internet to reconnect

FIX: Some Full-Text Search Failures Do Not Set @@ERROR

This article was previously published under Q287167
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 235700 (SHILOH_bugs)
When a full-text search statement fails, a query to the SQL Server @@ERROR global variable returns a 0 instead of the actual error number.
A 7619 error that is returned from the Microsoft Search Service returns the proper error message to the user but the @@ERROR global variable is not set.
To resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
To reproduce the problem, run the following statements in the SQL Server Query Analyzer. The output contains two errors. The first error does not set @@ERROR properly, but the second one does.
create database testgouse testif object_id('t1') is not null drop table t1gocreate table t1(  id int identity(1,1) primary key not null,  col varchar(100))gocreate unique index tableindex on t1(ID)goexec sp_fulltext_database 'enable'exec sp_fulltext_catalog 't1_catalog','create'exec sp_fulltext_table 't1','create','t1_catalog','tableindex'exec sp_fulltext_column 't1','col','add'goinsert into t1 values('SQL Server 2000')goexec sp_fulltext_catalog 't1_catalog','start_full'gowhile ( fulltextcatalogproperty ('t1_catalog','populatestatus') <>  0 ) waitfor delay '0:00:05'goselect * from t1goselect col from t1 where contains(col,'very')goselect @@error as 'The query fails but @@ERROR IS NOT set:'goselect col from t1 where contains(col,'SQL Server')goselect @@error as 'The query fails but @@ERROR IS set:'goexec sp_fulltext_table 't1','drop'exec sp_fulltext_Catalog 't1_catalog','drop'drop index t1.tableindexdrop table t1				

Article ID: 287167 - Last Review: 01/16/2015 21:31:44 - Revision: 3.2

Microsoft SQL Server 2000 Standard Edition

  • kbnosurvey kbarchive kbbug kbcodesnippet kbfix kbsqlserv2000sp1fix KB287167