Connect string of db on network (1 Viewer)

JohnPapa

Registered User.
Local time
Today, 20:03
Joined
Aug 15, 2010
Messages
954
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;"
 

GPGeorge

Grover Park George
Local time
Today, 10:03
Joined
Nov 25, 2004
Messages
1,873
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?
 

Gasman

Enthusiastic Amateur
Local time
Today, 18:03
Joined
Sep 21, 2011
Messages
14,309
I would expect DESKTOP-KQTNJ42 was your server name on your PC? :(
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:03
Joined
Oct 29, 2018
Messages
21,474
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.
 

JohnPapa

Registered User.
Local time
Today, 20:03
Joined
Aug 15, 2010
Messages
954
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