Page 1 of 1

List of available SQL SERVER database servers

Posted: Thu 04 Nov 2010 17:25
by RichTat
The TUniConnection.SpecificOptions dialog Connect tab includes a SERVER combobox containing a list of all currently available/detected SQL SERVER database servers.
How do I get this server list at run-time so that the user can select a server to make a connection ?

Posted: Fri 05 Nov 2010 07:38
by AndreyZ
Hello,

You can use the GetServerList global function from the Uni unit in the following way:

Code: Select all

  str := TStringList.Create;
  try
    GetServerList('SQL Server', str);
    // your code
  finally
    str.Free;
  end;

Posted: Sat 06 Nov 2010 12:54
by RichTat
Hello

Yes thank you that works.
However, I cannot find a reference to this function anywhere in the HELP screens - I looked for something before I asked the question.

Posted: Mon 08 Nov 2010 12:52
by AndreyZ
This function is undocumented.