Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Enumerate servers in network


This question is answered.


Permlink Replies: 3 - Last Post: Jun 24, 2017 6:49 PM Last Post By: Dmitry Arefiev
Anders Gustavsson

Posts: 26
Registered: 9/26/99
Enumerate servers in network  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2017 4:47 AM
Is there any way FireDAC can help me enumerate available mssql servers AND server instances (e.g. SERVERNAME\SQLEXPRESS) on the local network?

/Anders
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Enumerate servers in network  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 23, 2017 10:42 PM   in response to: Anders Gustavsson in response to: Anders Gustavsson
See method TFDPhysMSSQLDriverLink.GetServers(AList: TStrings; ARefresh: Boolean)

--
With best regards,
Dmitry
Anders Gustavsson

Posts: 26
Registered: 9/26/99
Re: Enumerate servers in network  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 24, 2017 4:10 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Thanks, but there are two problems here:

1. I only get ">discovering ...>" as the only item. I can see how that is used in the connection editor UI, but I can't find out how you do it. Could you please elaborate? (The help just says there is no information on GetServers)
2. Even in the Connection Editor there is no mentioning of an instance. I have SQLEXPRESS and my server is reported as COMPUTERNAME, but it should be COMPUTERNAME\SQLEXPRESS. Is there a way to go around this?

/Anders

Dmitry Arefiev wrote:
See method TFDPhysMSSQLDriverLink.GetServers(AList: TStrings; ARefresh: Boolean)

--
With best regards,
Dmitry
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Enumerate servers in network
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 24, 2017 6:49 PM   in response to: Anders Gustavsson in response to: Anders Gustavsson
1. I only get ">discovering ...>" as the only item. I can see how that is used in the connection editor UI, but I can't find out how you do it. Could you please elaborate? (The help just says there is no information on GetServers)

You should wait for some time. While FireDAC discovers servers, it will return "<discovering ...>".

2. Even in the Connection Editor there is no mentioning of an instance. I have SQLEXPRESS and my server is reported as COMPUTERNAME, but it should be COMPUTERNAME\SQLEXPRESS. Is there a way to go around this?

Probably your computer does not run SQL Server Browser service ...

--
With best regards,
Dmitry
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02