Board index » delphi » how to enumerate MS SQLServer in a Lan without any third file?
ari
Delphi Developer |
how to enumerate MS SQLServer in a Lan without any third file?2003-11-18 06:09:59 PM delphi87 hi, how to enumerate MS SQLServer in a Lan without any third file? i get some code from the internet like follow: procedure AddSQLComputers(lst: TStrings); var SQLServer: Variant; ServerList: Variant; i, nServers: integer; begin SQLServer := CreateOleObject('SQLDMO.Application'); ServerList := SQLServer.ListAvailableSQLServers; nServers := ServerList.Count; for i := 1 to nServers do begin lst.Add(ServerList.Item(i)); end; SQLServer := NULL; ServerList := NULL; end; but this code need the SQLQMO.dll file! so, my question is: are there any other way to do the same without third file? regard, Ari |