How to connnect the SQL SQL SERVER Express in Direct Mode?

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
Eden0928
Posts: 62
Joined: Sun 22 Apr 2012 14:08

How to connnect the SQL SQL SERVER Express in Direct Mode?

Post by Eden0928 » Fri 23 Jul 2021 03:24

Windows authentication in the Direct mode is supported
I set the sqloledb mode, the setting below :
HostName=.\SQLEXPRESS
DataBase=master
DriverName=DevartSQLServer

It can success connected.

But, I change to Direct Mode, setting below :
HostName=.\SQLEXPRESS
DataBase=master
DriverName=DevartSQLServerDirect

I get the "Cannot connect to server on host 'localhost'. Socket Error Code 10061 ($274D)" error message.

My dbexpress driver for SQL SERVER version is 7.5.7.

I wonder if I have missed any details.

Best regards.

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: How to connnect the SQL SQL SERVER Express in Direct Mode?

Post by Stellar » Fri 23 Jul 2021 11:57

Hello,

If you are not able to connect to the server in the Direct mode, but connection is successfully established through OLE DB, the most probable reason for this is that a TCP connection to the server is not allowed.

You can use the documentation to configure a remote connection to the server:
blogs.msdn.microsoft.com/walzenbach/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008/
support.microsoft.com/en-us/help/968872/how-to-open-the-firewall-port-for-sql-server-on-windows-server-2008#LetMeFixItMyselfAlways

Should you have any questions, do not hesitate to ask!
Best regards,
Sergey
Devart Team
www.devart.com

Eden0928
Posts: 62
Joined: Sun 22 Apr 2012 14:08

Re: How to connnect the SQL SQL SERVER Express in Direct Mode?

Post by Eden0928 » Mon 26 Jul 2021 05:59

Stellar wrote: Fri 23 Jul 2021 11:57 Hello,

If you are not able to connect to the server in the Direct mode, but connection is successfully established through OLE DB, the most probable reason for this is that a TCP connection to the server is not allowed.

You can use the documentation to configure a remote connection to the server:
blogs.msdn.microsoft.com/walzenbach/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008/
support.microsoft.com/en-us/help/968872/how-to-open-the-firewall-port-for-sql-server-on-windows-server-2008#LetMeFixItMyselfAlways

Should you have any questions, do not hesitate to ask!
Best regards,
Sergey
Devart Team
www.devart.com
Yes, After setting TCP/IP protocal to "Enabled", Direct Mode is ready to use!

Thank you!

Stellar
Devart Team
Posts: 496
Joined: Tue 03 Oct 2017 11:00

Re: How to connnect the SQL SQL SERVER Express in Direct Mode?

Post by Stellar » Tue 27 Jul 2021 17:20

Hello,

Glad to see that the issue was resolved.
Feel free to contact us if you have any further questions about our products.

Best regards,
Sergey
Devart Team
www.devart.com

Post Reply