The
It should be mentioned that a breaking change comes with the ODBC driver 18 for SQL Server.
The
connection is now encrypted by default (just in case it doesn't work right away):
The solution is simple though. Add
It only worked for 30 minutes and finally failed , could it its a problem with winhost.com, but I have written to them I'm not getting any reply
If the problem you have is the one I suspect you have, it's a potential security risk and I'm currently re-evaluating my use of SQL Server on Winhost.com because of it.
In a nutshell, Winhost has gone to Self-Certifaction for their SQL Servers. This snippet from this article explains the issue.
support.winhost.com
Reason:
This error occurs because
a self-signed certificate is being used for encrypted connections on our SQL server.
To resolve this issue:
For Classic ASP/ASP.NET/.NET Core applications, update your connection string with the following:
"Data Source=DBSERVERNAME;Initial Catalog=YOURDATABASENAME;User ID=YOURUSERID;Password=YOURPASSWORD;Encrypt=yes;
TrustServerCertificate=true"
Note that the last element of their suggested connection string example tells the application to trust their server certificate
implicitly, i.e. without verification.
I can no longer connect to any of my Winhost databases from Access without that segment, although the article refers only to web applications.
My understanding is that this is not desirable as it says, in effect, "trust me that I am who I claim to be," without the benefit of a third-party certification.
I've not had time to search for a different hosting company, and given that I'm not risking sensitive data in my personal use databases, I'm not rushing.
However, now that I understand the implications of a self-signed certificate, I'm really going to look for alternatives. I hate the thought because it's such a huge hassle, but in this day and age, complacency is not an option.
So, try that in your connections.
I also would like to solicit input from SQL Server experts who can elaborate more.