SET ANSI_DEFAULTS

Embedded SQL for C and SQL Server

Embedded SQL for C and SQL Server

SET ANSI_DEFAULTS

The SET ANSI_DEFAULTS statement sets ANSI defaults ON for the duration of the Microsoft® SQL Server™ 2000 query-processing session or for the duration of a running trigger or a stored procedure. This statement is supported only for connections to SQL Server version 6.5 or later.

Syntax

SET ANSI_DEFAULTS ON;

Arguments

ON

Specifies SQL-92 compatibility.

Remarks

The ON option sends the Transact-SQL statement SET ANSI_DEFAULTS ON to SQL Server and sets the following statements as shown:

SET CONCURRENCY LOCKCC

SET CURSORTYPE CUR_STANDARD

SET CURSOR_CLOSE_ON_COMMIT ON

SET FETCHBUFFER 1

SET SCROLLOPTION FORWARD

Note  Setting the SET ANSI_DEFAULTS statement to OFF is not supported. To reverse the effects of the SET ANSI_DEFAULTS statement, turn off each option listed earlier.

See Also

SET CONCURRENCY

SET FETCHBUFFER

SET CURSOR_CLOSE_ON_COMMIT

SET SCROLLOPTION

SET CURSORTYPE