Hello everyone, I hope I am asking the right people, I have an SQL server setup locally and I connect to it using this code:
strConnection = "Driver={SQL Server};Server=PCNAME;Database=Master;Trusted_Connection=yes"
Set cnDTB = New ADODB.Connection
cnDTB.ConnectionString = strConnection
cnDTB.Open
This works fine when I am running the VBA code on the same machine, but when I try to connect to it via a remote machine, I get this error when it tries to connect
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied
any tips will help, I am a beginner with SQL
strConnection = "Driver={SQL Server};Server=PCNAME;Database=Master;Trusted_Connection=yes"
Set cnDTB = New ADODB.Connection
cnDTB.ConnectionString = strConnection
cnDTB.Open
This works fine when I am running the VBA code on the same machine, but when I try to connect to it via a remote machine, I get this error when it tries to connect
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied
any tips will help, I am a beginner with SQL