StatusInfoRefetchInterval Property (SQL-DMO)

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]

Part Description
object Expression that evaluates to an object in the Applies To list
StatusInfo Long integer specifying a status information type as described in Settings
value Long integer specifying a number of seconds

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 Database objects active in the application.
SQLDMOStatInfo_Unknown 0 Bad or invalid value.

Remarks

When an application connects a SQLServer object to a server running Microsoft® SQL Server™, 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 example below 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 5 seconds.

oSQLServer.StatusInfoRefetchInterval( _

  SQLDMOStatInfo_AutoVerifyConnection) = 5

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);

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.