ListAvailableSQLServers Method
后续版本的 Microsoft SQL Server 将删除该功能。 请避免在新的开发工作中使用该功能,并着手修改当前还在使用该功能的应用程序。
The ListAvailableSQLServers method returns a NameList object that enumerates network-visible instances of Microsoft SQL Server.
语法
object.ListAvailableSQLServers()asNameList
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 SQLBrowseConnectfunction, 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. |