This problem was solved awhile back, so I'm editing the post with the solution. The intial code I had was correct, it was a settings problem on the server end that was keeping me from connecting. Anyway, the code looks like:
Dim conRecordset As New ADODB.Connection
Dim rsRecordSet As ADODB.Recordset
Dim strSQL As String
Dim bSuccess As Boolean
'Simplified SQL for demonstration
strSQL = "SELECT [DocumentID], [FolderID], [StatusDate] FROM [View MailingPart]
'Replace xx with your valid information
conRecordset.Open ("Driver={SQL Server};Server=xx.xx.xx.xx;Database=xx;Uid=xx;Pwd=xx")
Set rsRecordSet = New ADODB.Recordset
rsRecordSet.CursorLocation = adUseClient
rsRecordSet.Open strSQL, conRecordset
'Code using the recordset here
rsRecordSet.Close
conRecordset.Close
Also, I found this site which has almost every connection string you could want.
http://www.connectionstrings.com/
-Tril
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).