BUG: UPDATE Causes 306 and 403 Errors and Rolls Back Open Transaction (243635)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q243635
BUG #: 18891 (SQLBUG_65)

SYMPTOMS

An UPDATE statement that causes both a 306 and a 403 error will abort any active transactions (implicit or explicit). In other circumstances where these errors are encountered, neither a 306 nor a 403 error will roll back a transaction. The errors are:
Msg 403 Invalid operator for datatype op: %s type: %s

-and-

Msg 306 TEXT and IMAGE datatypes may not be used in the WHERE or HAVING clause, except with the LIKE predicate and the IS NULL predicate.

WORKAROUND

Modify the UPDATE statement so that it does not attempt operations that are illegal on text or image columns. Also, you should design the application so that no particular state is assumed following an unanticipated error. The value of the variable @@TRANCOUNT may be examined following an error to determine whether the current transaction is still open. @@TRANCOUNT specifies the number of currently active transactions for the current user.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 6.5.

Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbBug kbpending KB243635