FIX: Msg 550 Occurs When Inserting into View 'WITH CHECK OPTION' (199793)



The information in this article applies to:

  • Microsoft SQL Server 6.5

This article was previously published under Q199793
BUG #18266 (SQLBUG_65)

SYMPTOMS

If a view created with the 'WITH CHECK OPTION' has a correlated subquery, any attempts to update or insert into this view produces error 550:

Msg 550, Level 16, State 2 The attempted insert or update failed because the target view either specifies WITH CHECK OPTION or spans a view which specifies WITH CHECK OPTION and one or more rows resulting from the operation did not qualify under the CHECK OPTION constraint. Command has been aborted

WORKAROUND

To work around this problem, either avoid using a correlated subquery within a view created with the 'WITH CHECK OPTION', or convert the subquery into an equivalent join form.

STATUS

Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:

197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a

For more information, contact your primary support provider.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbBug kbfix KB199793