Page 1 of 1

Incomplete TMsConnectDialog.GetServerList result

Posted: Thu 04 Jun 2009 08:59
by brace
Is there a way to get the "real" list of all the servers?

Using TMSConnectDialog / Server dropdown (that is like calling TMsConnectDialog.GetServerList) I see a different list of servers depending on the machine on which I run the application.

Let's say there are 4 Instances of SQL Server:
1) SQL2000
2) SQL2005a
3) SQL2005b\INSTANCEa
4) SQL2005b\INSTANCEb

From PC1 (not in Windows domain) I see only (1) and (2).
From PC2 (in Windows domain) I see all 4.

But if I manually write on PC1 the 4 server names, I am able to connect anyway to all 4 servers, even if I see only 2 in the drop down list.

So... Is it a way to see all the 4 servers? Thanks.

Posted: Fri 05 Jun 2009 07:28
by Dimon
To get SQL Servers list we use OLEDB methods. Maybe the limitation that Microsoft doesn't return correct list on not domain Windows is connected with security policy.
Please check if you can get correct list using MS SQL Server Management Studio.

Posted: Fri 05 Jun 2009 14:32
by brace
No I cannot, I can just retrieve the same also with SQL Management Studio.

Yes may be it is for security.

Ok, I can cope with this. Thanks.

Posted: Tue 23 Jun 2009 17:02
by brace
I have a problem with instances. How can I get the list of instances?

On my local machie I have SQLSERVER\INSTANCE1 and SQLSERVER\INSTANCE2

From management studio I see in the server list:

SQLSERVER\INSTANCE1
SQLSERVER\INSTANCE2

while retrieveing server list with SDAC I get only

SQLSERVER

it is not possible to conect to SQLSERVER I need to specify SQLSERVER\INSTANCE1 or SQLSERVER\INSTANCE2.

Which is the best procedure to retrieve all the instances?

Posted: Wed 24 Jun 2009 06:55
by Dimon
Please, check that you have the latest SDAC build (4.70.0.47).
Also, you can set the TMSConnection.Server property to a correct value regardless of the received list of SQL Server instances.

Posted: Wed 24 Jun 2009 12:58
by brace
I know I can set it to any value but it would be of course more user friendly to get the correct list.
So is it possible to have the server list also in the SERVER\INSTANCE format?
Is there some way to call TMsConnectDialog.GetServerLists so that I see
instances too?

(I remind you in my machine I get from MS Management Sudio also the INSTANCES, while using SDAC only the servers).

(Please Note: Management Studio has also a MRU feature that keeps in memory wat the users type, but ignoring that list, anyway I an see SERVER\INSTANCE in "fresh (=no MRU) drop down).

Posted: Fri 26 Jun 2009 07:17
by Dimon
The TMsConnectDialog.GetServerLists method returns the server list with instance names, only if the instance name is not equal to MSSQLSERVER.
Please supply me the following information:
- the exact version of your IDE;
- the exact version of SDAC;
- the exact versions of SQL servers and the instance names.

Posted: Fri 26 Jun 2009 09:15
by brace
IDE
CodeGearâ„¢ RAD Studio 2009 Version 12.0.3210.17555

SDAC
4.70.0.48

Serverlist:
The problematic one is this case:
I have on my machine 2 instances, on is MYMACHINE\TEST2005 and MYMACHINE\TEST2008.

First I installed SQLServer 2005 and I renamed the default instance to TEST2005 then In installed SQLServer 2008 and I rename the default instance to TEST2008. So I have 2 separate services (one for 2005 and one for 2008).

When I browse servers in Management Studio I get:
MYMACHINE\TEST2005
MYMACHINE\TEST2008

While TMsConnectDialog.GetServerLists returns only
MYMACHINE (a not existing instance)

(same results are returned using SDAC 3!!!)

So may be SDAC is puzzle by the fact that I have 2 different DB engines (2005 and 2008, where the default instance MSSQLSERVER has been renamed to other name)?

Moreover in the list returned by TMsConnectDialog.GetServerLists there is a server name ('pcraq1') that it is not returned by Management Studio. Moreover I am not 100% sure but this is the name of a machine I tried (unsuccesfully) to connect to some months ago... This is not clear to me.

Posted: Fri 26 Jun 2009 09:33
by Dimon
Please check if the GetServerList procedure from the MSAccess unit returns the same result.

Posted: Fri 26 Jun 2009 11:18
by brace
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Clear;
MsConnectDialog1.GetServerList(Memo1.Lines);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Memo2.Clear;
MSaccess.GetServerList(Memo2.Lines);
end;

And 2 Memos are the same. So to aswer your question yes, they are the same.

Posted: Wed 01 Jul 2009 08:47
by Dimon
To investigate the problem, please, contact us by e-mail at dmitryg*devart*com.