Hi, posted this in the wrong place I think earlier, I hope this is more suitable...
==============================================
Hi,
I have some ASP code that connects to an Access database. I am now trying change this code so it connects to my new SQL server database.
Can someone suggest what I am doing wrong as I get an error:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Original connection string is:
Set DBConn=Server.CreateObject("ADODB.Connection")
DBConn.Provider="Microsoft.Jet.OLEDB.4.0"
DBConn.Open Server.MapPath("../db/databasename.mdb")
New string (not working) is:
set DBConn = Server.CreateObject("ADODB.Connection")
sConn = "Provider=SQLOLEDB.1;User ID=USERID;password=PASSWORD;Initial Catalog=DATABASENAME;Data Source = SQLSERVERNAME;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"
DBConn.Open sConn
Many thanks.
Robbo