Please use the following connection string on Windows 2008 servers to connect to the local MSSQL service:
"Provider=SQLOLEDB;Data Source=myServerAddress;UID=myUsername; PWD=myPassword; database=myDataBase;"
Another method is to use a driver like so:
"Driver={SQL Server Native Client 10.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;"
Note: The second method, with the driver, has shown some compatibility problems with some databases.
In the above two examples, substitute the variables where:
myDataBase and myUsername and myPassword are what you've already specified in the control panel under MSSQL databases. myServerAddress can be 'localhost' or you may need to specify '.\SQLEXPRESS'
Sample code:
Set strConnString=Server.CreateObject("ADODB.CONNECTION")
connect = "Provider=SQLOLEDB;Data Source=.\SQLEXPRESS;UID=USERNAME; PWD=PASSWORD; database=DB;"
strConnString.ConnectionString = connect
strConnString.Open