Direct Mode

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Romano
Posts: 41
Joined: Tue 10 Feb 2009 11:21

Direct Mode

Post by Romano » Tue 02 Dec 2014 08:42

Hi,
is any help for Direct Mode settings? I try to connect to my local SQL Server and I cannot - connection refused.
I have named instance of MS SQL Server 2014 - 'MyComputer\SQL2014' and I have enabled the TCP/IP protocol...

Thanks
Roman Krupicka

feamster
Posts: 24
Joined: Thu 11 Nov 2004 12:59

Re: Direct Mode

Post by feamster » Tue 02 Dec 2014 14:51

Try using tcpip which means an ip address (which is working for me) or maybe something that dns can resolve. I think using named instances is a higher level of access and involves the operating system.

Romano
Posts: 41
Joined: Tue 10 Feb 2009 11:21

Re: Direct Mode

Post by Romano » Wed 03 Dec 2014 07:57

But I have 3 local SQL Servers, each is named instance: "MyComputer\SQL2008R2", "MyComputer\SQL2012", "MyComputer\SQL2014"...

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Direct Mode

Post by azyk » Wed 03 Dec 2014 12:56

To solve the problem, before establishing connection, try to connect the TMSConnection.Port option to 0. For example:

Code: Select all

  MSConnection.Port := 0;

Romano
Posts: 41
Joined: Tue 10 Feb 2009 11:21

Re: Direct Mode

Post by Romano » Thu 04 Dec 2014 08:07

Hi,
I still get error message:
Cannot connect to server on host 'MyComputer':
Socket Error Code: 10061($274D)

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Direct Mode

Post by azyk » Fri 05 Dec 2014 09:33

Please check whether a successful connection can be established to the specified instances ("MyComputer\SQL2008R2", "MyComputer\SQL2012", "MyComputer\SQL2014") using SQL Server Management Studio. At this, use SQL Server Authentication and the credentials of the user you used in the Direct mode.

Note: the reason for this problem can be incorrect network or SQL Server configuration. Please look at the 10061 error code description at MSDN: http://msdn.microsoft.com/en-us/library ... s.85).aspx

Romano
Posts: 41
Joined: Tue 10 Feb 2009 11:21

Re: Direct Mode

Post by Romano » Thu 11 Dec 2014 07:29

I can connect to all my instances using SQl Server Management Studio. I can connect also with my application with NativeClient. I have TCP/IP protocol enabled.
I run SQL2014 only, SQL2008R2 and SQL2012 is off.

azyk
Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: Direct Mode

Post by azyk » Thu 18 Dec 2014 10:06

Please make sure you are using TCP/IP protocol for connection using SQL Server Management Studio. For this, go to File->New->Database Engine Query, in the appeared dialog in the Server name field enter "MyComputer\SQL2014", select Authentication - SQL Server Authentication, fill in user login and password. Then press the Options button, on the Connection Properties tab in the Network protocol combobox select the TCP/IP value, and press Connect. Please let us know the results.

Post Reply