Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

AnsiNullsStatus Property

This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.

The AnsiNullsStatus property returns TRUE when the database object referenced depends on a table exhibiting ISO NULL handling behavior.

object.AnsiNullsStatus

object

An expression that evaluates to an object in the Applies To list

Boolean

Read/write when a StoredProcedure2, Trigger2, UserDefinedFunction, or View2 object is created. Read-only when a StoredProcedure, Trigger, or View object is used, or after a StoredProcedure2, Trigger2, UserDefinedFunction, or View2object is created.

HRESULT GetAnsiNullsStatus(LPBOOL pRetVal);

By default, Microsoft SQL Server creates columns that do not accept NULL unless the user explicitly declares the ability to accept NULL. Further, SQL Server returns TRUE when evaluating the expression NULL = NULL. These default behaviors are nonstandard.

Database and client connection options override default SQL Server behavior. If the default is overridden, tables created exhibit ISO standard NULL handling and objects that depend upon those tables function as specified by ISO.

NoteNote

If an application calls AnsiNullsStatuson an instance of SQL Server version 7.0 with the Table2 object, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000 or later" are returned.

Community Additions

ADD
Show:
© 2015 Microsoft