Cannot connect to SQL Server on a network (1 Viewer)

Check bitness of ODBC Driver (should match Office bitness). If Office (not Windows!) is x64 install x64 version of ODBC-Driver, if Office is x86 install x86 version of ODBC-Driver!
The correct ODBC driver (bitnesswise) had been installed
 
re 1. That means very little. Put some meat on it by including a screenshot of the rule(s) that you think open the firewall.
re 2. That means very little. Ping does not use TCP/IP while SQL Server does (in one of its configurations).

I would leave ODBC out of the equation for a moment, and run all tests using SSMS.

SERVER=DESKTOP-KQTNJ42\SQLEXPRESS: this means you're connecting to an instance of SQL Server, not the default instance. This will help you narrow down online articles. It requires another app to be running on the server (SQL Server Browser) and an extra port open 1434 UDP by default.
Once I locate the "meat" I will send it over in a screenshot.

SQL Server Browser was not running and it is running now.

From both pcs I can enter the db through SSMS by using the following. I have made sure that both are looking at the same db, by making a change in one of the fields.

1708360902985.png
 
Your SSMS connection screenshot does not jive with your connect string. Server Name is the SQL Server name, not the machine name. Shouldn't it be: DESKTOP-KQTNJ42\SQLEXPRESS. Either that, or your connect string should be: SERVER=DESKTOP-KQTNJ42
 
Your SSMS connection screenshot does not jive with your connect string. Server Name is the SQL Server name, not the machine name. Shouldn't it be: DESKTOP-KQTNJ42\SQLEXPRESS. Either that, or your connect string should be: SERVER=DESKTOP-KQTNJ42
The machine name is DESKTOP-KQTNJ42 and the server name is SQLEXPRESS
 
Found the problem. In #18 above I said

Code:
I use the following connection string from the desktop success fully
ODBC;PROVIDER=MSDASQL;DRIVER=ODBC Driver 17 for SQL Server;SERVER=DESKTOP-KQTNJ42\SQLEXPRESS;UID=savf;Trusted_Connection=No;APP=Microsoft Office;DATABASE=VF3;PWD=1234

I use the same connection string without PROVIDER=MSDASQL and receive the following error

It appears that in A365 bit 64 the "PROVIDER=MSDASQL" is also needed. So no need to check for bitness and the above connection string works for both 32 and 64 bit.
 
The problem was resolved for the Desktop-Laptop network. Unfortunately I still have the problem with the pc running W10 A365 32bit on the 4pc network. I will try to run the code step by step after I double check the firewall rules and the TCP-IP connectivity.
 

Users who are viewing this thread

Top Bottom