BUG: Access Violation Occurs When a Variable is Used in FREETEXTTABLE Function as Search String Inside a Cursor Definition (276447)
The information in this article applies to:
This article was previously published under Q276447
BUG #: 58182 (SQLBUG_70)
SYMPTOMS
An Access Violation (AV) may occur when you execute a stored procedure that defines a dynamic or static cursor, and both of the following conditions are met:
- The cursor uses the FREETEXTTABLE function in its SELECT statement.
-and-
- A variable that contains the value of the search string is passed as an argument to the FREETEXTTABLE function instead of the literal string value.
CAUSE
Normally, when variables are used within a cursor, the cursor makes a copy of all the variables in its execution space. However, in this case the cursor does not make a copy of the variables used within FREETEXTTABLE.
Use of a variable to specify the search argument in a full-text predicate when accessed through a cursor is not supported.
WORKAROUND
To avoid the problem, do not use a variable as a search argument to FREETEXTTABLE inside a cursor definition.
SQL Server 2000 returns the following error message when you attempt to perform such an operation:
Server: Msg 1079, Level 15, State 1, Procedure cursorAV, Line 6
A variable cannot be used to specify a search condition in a fulltext predicate when accessed through a cursor.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 7.0.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug kbDSupport KB276447 |
---|
|