Page 1 of 1

Finding existing SQL servers

Posted: Wed 08 Jun 2005 07:37
by maciejw
How can I find any SQL server exist in lan area using SDAC

Posted: Wed 08 Jun 2005 07:41
by Ikar
Use procedure GetServerList(List: TStrings) from MSAccess unit

Posted: Wed 08 Jun 2005 07:56
by maciejw
oooops ... I forgot this .... thanks

Posted: Wed 08 Jun 2005 08:30
by maciejw
MsAccess.GetServerList(ListBox1.Items);

After tahat the list is empty.

Do I need any preconfig of MsAccess before I use this procedure ?

How it works if I have few instantions of Ms SQL Server ?

Posted: Thu 09 Jun 2005 12:40
by Ikar
> After tahat the list is empty.
> Do I need any preconfig of MsAccess before I use this procedure ?

Not.

> How it works if I have few instantions of Ms SQL Server ?

It doesn't depend on number of servers. At first, a list of the servers from OLE DB is obtained, see MSDN for details. It doesn't work for Win9x. Then servers from the registry are get HKLM\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo

Posted: Thu 09 Jun 2005 12:57
by maciejw
ok. I found what's going on. If I use unnamed connections (by ip number or localhost) and there is unnamed (SQL Client utility) instance of SQL there list is empty.

So ..... SDAC cannot find an SQL instance in this moment.