The CompatibilityLevel property controls the behavior of an instance of Microsoft® SQL Server™, setting behavior to match either the current or earlier version.
object.CompatibilityLevel [= value]
object
Expression that evaluates to an object in the Applies To list
value
Long integer that specifies an instance of SQL Server as described in Settings
Long, enumerated
Read/write
HRESULT GetCompatibilityLevel(
SQLDMO_COMP_LEVEL_TYPE* pRetVal);
HRESULT SetCompatibilityLevel(
SQLDMO_COMP_LEVEL_TYPE NewValue);
Set CompatibilityLevel using these SQLDMO_COMP_LEVEL_TYPE values.
Constant | Value | Description |
---|---|---|
SQLDMOCompLevel_60 | 60 | Force SQL Server version 6.0 behavior. |
SQLDMOCompLevel_65 | 65 | Force SQL Server version 6.5 behavior. |
SQLDMOCompLevel_70 | 70 | Force SQL Server version 7.0 behavior. |
SQLDMOCompLevel_80 | 80 | Default. Instance behaves as documented for SQL Server 2000. |
SQLDMOCompLevel_Unknown | 0 | Bad or invalid value. |