How do I connect to MSSQL using Classic ASP
Posted by Arvand Sabetian (Import) on 14 July 2009 09:00 PM
|
|
Please use the following connection string on our Windows 2008 servers to connect to the local MSSQL service: "Provider=SQLOLEDB;Data Source=myServerAddress;UID=myUsername; PWD=myPassword; database=myDataBase;"
"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: Set strConnString=Server.CreateObject("ADODB.CONNECTION")
connect = "Provider=SQLOLEDB;Data Source=.\SQLEXPRESS;UID=USERNAME; PWD=PASSWORD; database=DB;" strConnString.ConnectionString = connect strConnString.Open | |
|
Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.Open "provider=Microsoft.Jet.OLEDB.4.0; data source=D:\accounts\mqtgolfer\database\mydb.mdb"
My question is what would I use to open the same file on Arvixe?
If you get further errors, generally googling the error will get you on your way.
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.
If you still face issues, please try creating a new SQL user and assigning it to your database using our control panel, then updating management studios to reflect this new user and try connecting.
If you continue to face issues, please submit a support ticket so we can better assist you.