I have a point of sale system installed on a virtual machine on my LAN. The point of sale software references a SQL Server installed on the same virtual machine (localhost). Using this system that references the database works perfectly from the LAN, everything is great.
Trying to use the point of sale software from either the WLAN (different subnet) or from a VPN, both give the same error, it's "Error 40 - could not open a connection to SQL Server."
The way we run the software is by running the .exe file on the server from each client machine. The software is not installed on the clients, the clients run it through the network by creating a shortcut with the IP and file location. I don't know why, don't ask.
I have spent an entire day searching for a reason and how to fix it, I don't know how and I need to bring in some outside help to get this issue worked out. Here is what I tried:
- I contacted the company that installed the system, they have no idea.
- I asked them for the database password so I can log in and check settings, they refused to give it to me, even though it's installed on my server. I could force them to give it to me but at this point I don't even know what I'd be looking for.
- I asked them if "allow access from remote locations" is checked and they confirmed it is.
- I logged into the SQL configuration tool on the server and confirmed the 3 settings are enabled that I see in every search result: TCP/IP, Shared Memory and Named Pipes, they're all enabled.
- I confirmed the server is running and also restarted the service.
And just to confirm, running the program across subnets (or from a VPN) opens the program but the program gives this SQL Server error when trying to connect, or at least that's what it seems like.
The server is up and running, it works perfectly when accessed from the LAN. I also confirmed the service is running.
I didn't look at the firewall exceptions but I did turn the firewall completely off inside Windows Server.
The port is 1433.
I confirmed everything in the article you posted except for the Browser Service, I emailed them to check that on their end. Everything else was already set up properly and I still get the error.