michaeldean99
asked on
classic asp connection to sql server
Problem with sql server database connection
This was working until the early hours of this morning!
Application("dbConnect") = "Driver={SQL Server};Server=xx.xxx.xxx. xx;DSN=mde an_stampsf orsale;PWD =xxxxx"
Application("dbUSER") = "mdean_stampsforsale"
Application("dbPW") = "xxxxxxxx"
------------------
DIM conn
SET conn = Server.CreateObject("ADODB .Connectio n")
conn.open Application("dbConnect"),A pplication ("dbUSER") ,Applicati on("dbPW")
'** Transaction START
DIM connCart
SET connCart = Server.CreateObject("ADODB .Connectio n")
connCart.open conn ************************** ********** ********** *** line 71
IF connCart.Properties("Trans action DDL") = 8 THEN connCart.BeginTrans
----------------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/LM/W3SVC/1/ROOT/global.as a, line 71
This was working until the early hours of this morning!
Application("dbConnect") = "Driver={SQL Server};Server=xx.xxx.xxx.
Application("dbUSER") = "mdean_stampsforsale"
Application("dbPW") = "xxxxxxxx"
------------------
DIM conn
SET conn = Server.CreateObject("ADODB
conn.open Application("dbConnect"),A
'** Transaction START
DIM connCart
SET connCart = Server.CreateObject("ADODB
connCart.open conn **************************
IF connCart.Properties("Trans
----------------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/LM/W3SVC/1/ROOT/global.as
ASKER
thanks. I have tried your suggested connection string but it doesn't work.
What occurred was that it is a new installation. The code was working fine until around 2am this morning and then the connection string failed.
Is there anything I could look at on the database (assuming I could connect to it!) or suggest to the hosting company that they look at?
What occurred was that it is a new installation. The code was working fine until around 2am this morning and then the connection string failed.
Is there anything I could look at on the database (assuming I could connect to it!) or suggest to the hosting company that they look at?
> it is a new installation
Are you sure that the database is running, and that no firewall blocks access to it?
The code from http://www.connectionstrings.com should work. If not, it is not the syntax of the connection string that is wrong.
Are you sure that the database is running, and that no firewall blocks access to it?
The code from http://www.connectionstrings.com should work. If not, it is not the syntax of the connection string that is wrong.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for your guidance.
https://www.experts-exchange.com/A_1881.html
in your case, you specify both DSN and Driver, which is "double work".
please fix it using the connection string suggestions from this link:
http://www.connectionstrings.com/sql-server-2005