Johnjces
asked on
Find MS SQL Servers on a network, How To
I have used the following code to find MS SQL Servers on a LAN.
procedure GetAvailableServers (Var slServerList : TStringList);
var
objList : OleVariant;
iCount: Integer;
obj : OleVariant;
begin
obj := CreateOleObject('SQLDMO.Ap plication' );
objlist := obj.ListAvailableSQlServer s;
for iCount := 1 to objList.Count do
slServerList.Add(objList.I tem(iCount ));
end;
It works on my PC only which is the development PC. Other PCs running Win 2000 error with "Invalid Class String" and I am pretty certain it is erroring in the main line,
obj := CreateOleObject('SQLDMO.Ap plication' );
Is there another method for locating running MS SQL Servers on a LAN without using comobj OR what dll do I need to copy to the other PCs and register for this code to work and not error. All pcs are using MS SQL server and can connect to MS SQL server just fine.
Thanks!
procedure GetAvailableServers (Var slServerList : TStringList);
var
objList : OleVariant;
iCount: Integer;
obj : OleVariant;
begin
obj := CreateOleObject('SQLDMO.Ap
objlist := obj.ListAvailableSQlServer
for iCount := 1 to objList.Count do
slServerList.Add(objList.I
end;
It works on my PC only which is the development PC. Other PCs running Win 2000 error with "Invalid Class String" and I am pretty certain it is erroring in the main line,
obj := CreateOleObject('SQLDMO.Ap
Is there another method for locating running MS SQL Servers on a LAN without using comobj OR what dll do I need to copy to the other PCs and register for this code to work and not error. All pcs are using MS SQL server and can connect to MS SQL server just fine.
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
all I searched for was:
Find SQL Servers
and checked "Restrict to this Topic Area"
first hit was the right answer... I knew it was here somewhere
Find SQL Servers
and checked "Restrict to this Topic Area"
first hit was the right answer... I knew it was here somewhere
ASKER
Thanks for searching!