Export (0) Print
Expand All

sqlsrv_configure

Changes the settings for error handling and logging options.


sqlsrv_configure( string $setting, mixed $value )

$setting: The name of the setting to be configured. The possible values are "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity".

$value: The value to be applied to the setting specified in the $setting parameter. The possible values for this parameter depend on which setting is specified. The following table lists the possible combinations:

Setting

Possible values for $value parameter (integer equivalent in parentheses)

Default value

WarningsReturnAsErrors

true (1) or false (0)

true (1)

LogSubsystems

SQLSRV_LOG_SYSTEM_ALL (-1)

SQLSRV_LOG_SYSTEM_CONN (2)

SQLSRV_LOG_SYSTEM_INIT (1)

SQLSRV_LOG_SYSTEM_OFF (0)

SQLSRV_LOG_SYSTEM_STMT (4)

SQLSRV_LOG_SYSTEM_UTIL (8)

SQLSRV_LOG_SYSTEM_OFF (0)

LogSeverity

SQLSRV_LOG_SEVERITY_ALL (-1)

SQLSRV_LOG_SEVERITY_ERROR (1)

SQLSRV_LOG_SEVERITY_NOTICE (4)

SQLSRV_LOG_SEVERITY_WARNING (2)

SQLSRV_LOG_SEVERITY_ERROR (1)

If sqlsrv_configure is called with an unsupported setting or value, the function returns false. Otherwise, the function returns true.

For more information about configuring error and warning handling, see How to: Configure Error and Warning Handling Using the SQLSRV Driver.

For more information about logging activity, see Logging Activity.

Community Additions

Show:
© 2015 Microsoft