StatusInfoRefetchInterval Property

SQL-DMO

SQL-DMO

StatusInfoRefetchInterval Property

The StatusInfoRefetchInterval property controls the periodic, automatic update of status information maintained in SQL-DMO objects.

Applies To
SQLServer Object
Syntax

object.StatusInfoRefetchInterval(StatusInfo) [= value]

Parts

object

Expression that evaluates to an object in the Applies To list

StatusInfo

Long integer that specifies a status information type as described in Settings

value

Long integer that specifies a number of seconds

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetStatusInfoRefetchInterval(
SQLDMO_STATUSINFO_TYPE StatusInfoType,
LPLONG pRefetchSeconds);

HRESULT SetStatusInfoRefetchInterval(
SQLDMO_STATUSINFO_TYPE StatusInfoType,
long RefetchSeconds);

Settings
Constant Value Description
SQLDMOStatInfo_All 7 Used when setting StatusInfoRefetchInterval only. Set all values equal.
SQLDMOStatInfo_AutoVerifyConnection 4 Interval for testing broken connection.
SQLDMOStatInfo_DatabaseSpace 2 Interval for retrieving space available in databases referenced by Database objects active in the application.
SQLDMOStatInfo_DatabaseStatus 1 Interval for retrieving database status information, visible in the Status property, of active Database objects  in the application.
SQLDMOStatInfo_Unknown 0 Bad or invalid value.

Remarks

When an application connects a SQLServer object to an instance of Microsoft® SQL Server™ 2000, SQL-DMO automates the retrieval of some status information that allows application action based on changes in status for some SQL Server components.

By default, periodic update of status information is performed every 30 seconds.

Set a status interval value to 0 to stop periodic status information update. The following example illustrates creating a SQLServer object, then configuring status information periodic update by disabling all updating, then enabling only a test for broken connection.

' Create the SQLServer object.
Dim oSQLServer as New SQLDMO.SQLServer

' Disable all periodic updating.
oSQLServer.StatusInfoRefetchInterval(SQLDMOStatInfo_All) = 0

' Enable broken connection detection, setting to test every five seconds.
oSQLServer.StatusInfoRefetchInterval( _ 
  SQLDMOStatInfo_AutoVerifyConnection) = 5