Connect string of db on network (1 Viewer)

JohnPapa

Registered User.
Joined
Aug 15, 2010
Messages
961
When the SQL db is on the same pc as the Access .accdb, I can use a connect string like

"ODBC;DRIVER=ODBC Driver 17 for SQL Server;SERVER=DESKTOP-KQTNJ42\SQLEXPRESS;UID=savf;PWD=1234;Trusted_Connection=No;APP=Microsoft Office;DATABASE=VF1"

To modify the connect string to access the SQL db on a network do I only need to change

"SERVER=DESKTOP-KQTNJ42\SQLEXPRESS;"

to something like

"SERVER=\\servername\DESKTOP-KQTNJ42\SQLEXPRESS;"
 
When the SQL db is on the same pc as the Access .accdb, I can use a connect string like

"ODBC;DRIVER=ODBC Driver 17 for SQL Server;SERVER=DESKTOP-KQTNJ42\SQLEXPRESS;UID=savf;PWD=1234;Trusted_Connection=No;APP=Microsoft Office;DATABASE=VF1"

To modify the connect string to access the SQL db on a network do I only need to change

"SERVER=DESKTOP-KQTNJ42\SQLEXPRESS;"

to something like

"SERVER=\\servername\DESKTOP-KQTNJ42\SQLEXPRESS;"
What have you tried so far?
 
I would expect DESKTOP-KQTNJ42 was your server name on your PC? :(
 
To modify the connect string to access the SQL db on a network do I only need to change

"SERVER=DESKTOP-KQTNJ42\SQLEXPRESS;"

to something like

"SERVER=\\servername\DESKTOP-KQTNJ42\SQLEXPRESS;"
You will of course need to use the correct instance name of the database on the server. It may or may not be the same as the one on your desktop.
 
You will of course need to use the correct instance name of the database on the server. It may or may not be the same as the one on your desktop.
Thanks, will try it out when I have access to the network
 

Users who are viewing this thread

Top Bottom