Hello, i see that is old post but maybe i can add valuable info about sql error 40.
This error appears mostly when:
- SQL Server does not allow remote connections
- Firewall Settings
- TCP/IP is not enabled.
Some quick steps to solve this error are:
Check SQL Server is running
Make sure that Allow Remote Connections is enabled on sql server properties
Check if TCP/IP is enabled Configure to allow SQL Server in Firewall Settings
Check for working fine SQL Server Browser
Make sure that you can ping the SQL Server
I found this article to explain steps by step those solution and maybe can be helpful for the members in the future. Thnx