Metoda ListInstalledInstances
Ta funkcja zostanie usunięta z przyszłej wersji programu Microsoft SQL Server. Należy unikać stosowania tej funkcji w nowych projektach oraz zaplanować modyfikację aplikacji, w których obecnie jest używana ta funkcja.
ListInstalledInstances Metoda zwraca NameList obiekt, który wylicza wszystkie wystąpienia zainstalowanych Microsoft SQL Server na komputerze lokalnym lub określonym.
Składnia
object
.ListInstalledInstances( [ ServerName ] ) as NameList
Części
obiekt
Wyrażenie, którego wartością obiekt na liście dotyczy.Nazwa_serwera
Opcjonalny ciąg Określa nazwa serwera zdalnego.
Prototyp (C/C++)
HRESULT ListInstalledInstances(
LPSQLDMONAMELIST *ppServerNames,
SQLDMO_LPCSTR ServerName);
Zwraca
A NameList obiekt, który wylicza wystąpień programu SQL Server.
Uwagi
Domyślnie ListInstalledInstances zwraca listę wystąpień programu SQL Server na komputerze lokalnym.When called with the optional ServerName parameter, ListInstalledInstances returns a list of SQL Server instances on a specified computer.ListInstalledInstances does not require a connection.
Ostrzeżenie
Jeśli aplikacja wywoła ListInstalledInstances na wystąpienie programu SQL Server w wersja 7.0, puste NameList obiekt jest zwracany.