The typical connection string I use for SQL Server looks something like this:
cnDB.Open "Provider=SQLOLEDB;" _
& "Data Source=(local);" _
& "Initial Catalog=Intranet;" _
& "User ID=sa;" _
& "Password=sa!;"
In cases where I need to point to another server, there are cases in which I need to specify the network library. Here's how you can do it:
cnDB.Open "Provider=SQLOLEDB;" _
& "Data Source=(local);" _
& "Initial Catalog=Intranet;" _
& "Network Library=DBMSSOCN;" _
& "User ID=sa;" _
& "Password=sa!;"
This specifies that the socket library is to be used for this connection. It's redundant for the same server, but if you need to point from one server to another, it can come in handy. The network libraries that are available are listed in the SQL Client Configuration Utility or the Server Configuration Utility.