Microsoft KB Archive/287167

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

Article ID: 287167

Article Last Modified on 10/17/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q287167



BUG #: 235700 (SHILOH_bugs)



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



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



RESOLUTION
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 the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack



STATUS
Microsoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.



MORE INFORMATION
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 test go

use test

if object_id('t1') is not null drop table t1 go create table t1 ( id int identity(1,1) primary key not null,  col varchar(100) ) go

create unique index tableindex on t1(ID) go

exec 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' go

insert into t1 values('SQL Server 2000') go exec sp_fulltext_catalog 't1_catalog','start_full' go while ( fulltextcatalogproperty ('t1_catalog','populatestatus') <> 0 ) waitfor delay '0:00:05' go

select * from t1 go

select col from t1 where contains(col,'very') go select @@error as 'The query fails but @@ERROR IS NOT set:' go

select col from t1 where contains(col,'SQL Server') go select @@error as 'The query fails but @@ERROR IS set:' go

exec sp_fulltext_table 't1','drop' exec sp_fulltext_Catalog 't1_catalog','drop' drop index t1.tableindex drop table t1

Keywords: kbbug kbfix kbcodesnippet kbsqlserv2000sp1fix KB287167

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.