Finding existing SQL servers

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
maciejw
Posts: 11
Joined: Sun 20 Mar 2005 10:37
Location: Poland
Contact:

Finding existing SQL servers

Post by maciejw » Wed 08 Jun 2005 07:37

How can I find any SQL server exist in lan area using SDAC

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 08 Jun 2005 07:41

Use procedure GetServerList(List: TStrings) from MSAccess unit

maciejw
Posts: 11
Joined: Sun 20 Mar 2005 10:37
Location: Poland
Contact:

Post by maciejw » Wed 08 Jun 2005 07:56

oooops ... I forgot this .... thanks

maciejw
Posts: 11
Joined: Sun 20 Mar 2005 10:37
Location: Poland
Contact:

Post by maciejw » Wed 08 Jun 2005 08:30

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 ?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 09 Jun 2005 12:40

> 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

maciejw
Posts: 11
Joined: Sun 20 Mar 2005 10:37
Location: Poland
Contact:

Post by maciejw » Thu 09 Jun 2005 12:57

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.

Post Reply