remote connection string

sdforsb

New member
Local time
Yesterday, 17:10
Joined
Nov 21, 2012
Messages
5
I am pretty new to this. I am trying to put together a vba adodb connection string to a remote server. It is the first time I am using adodb in this context. I can get msysobj.connect but how do I format that information into a connection object connection string?
 
David - Thanks for the help.

This is what worked for me:

Public Function GetStrConnection() As String
GetStrConnection = "Provider=SQLOLEDB;Data Source=MyServer;" & _
"Initial Catalog=MyDataBase;UID=SA;PWD=Password"
End Function
 

Users who are viewing this thread

Back
Top Bottom