ListAvailableSQLServers Method
未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。
The ListAvailableSQLServers method returns a NameList object that enumerates network-visible instances of Microsoft SQL Server.
語法
object
.ListAvailableSQLServers(
)
as
NameList
Parts
- object
Expression that evaluates to an object in the Applies To list.
Prototype (C/C++)
HRESULT ListAvailableSQLServers(
LPSQLDMONAMELIST* ppServerNames);
Returns
A NameList object that enumerates instances of SQL Server.
備註
Nondefault instances of SQL Server are displayed in the form of SERVERNAME/INSTANCENAME.
附註: |
---|
The ListAvailableSQLServers method maps to the ODBC SQLBrowseConnect function, which does not support connection pooling. Therefore, an application that enables connection pooling might encounter the error "Microsoft SQL-DMO (0x800A000E) [SQL-DMO] Not enough storage is available to complete this operation." when calling ListAvailableSQLServers. |