I've seen many different ways to 'connect' to a SQL database. I'm using ADO and I need the 'best' DSN-less way. One site recommends the following:
With cn
.ConnectionString = "Driver={SQL Server};" & _
"Server=(erpserv);" & _
"Database=" & sDB & ";" & _
"Uid=" & sUser & ";" & _
"Pwd=" & sPass
.CursorLocation = adUseClient
.Open
End With
I've defined sDB, sUser, and sPass. 'erpserver' is the DNS name on our LAN of the SQL 2000 server.
After about a 15 second delay, I get the error "Client unable to establish connection".
-with thanks.
With cn
.ConnectionString = "Driver={SQL Server};" & _
"Server=(erpserv);" & _
"Database=" & sDB & ";" & _
"Uid=" & sUser & ";" & _
"Pwd=" & sPass
.CursorLocation = adUseClient
.Open
End With
I've defined sDB, sUser, and sPass. 'erpserver' is the DNS name on our LAN of the SQL 2000 server.
After about a 15 second delay, I get the error "Client unable to establish connection".
-with thanks.