By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,162 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,162 IT Pros & Developers. It's quick & easy.

Can't connect with database suddenly!

P: 2
Godaddy updated their server recently and now we can't connect to our database.

Here is the connection string: strDBPath="Driver={MySQL ODBC 3.51 Driver};Server=name.db.number.hostedresource.com;D ATABASE=dbfname;UID=userid;PWD=password;"

I've double checked with Godaddy that the driver is correct, the connection string looks right, but no connection.

Using MySql 5.5, IIs 7, windows server (long story)

Error code below writes to page "empty" and "Operation is not allowed when the object is closed." You can see the test page here (constantly changing for testing reasons): http://www.oralbibleresources.com/sh...roblemCode.asp

I'm NOT an expert in any of this so any of this, so really easy english will help. THANK YOU!!

Expand|Select|Wrap|Line Numbers
  1.    response.write (connection)
  2. if connectionstring <> 0 then
  3.   response.write (connectionstring)
  4. else
  5.     response.write "empty"  
  6.  
  7. end if
  8. %>
  9.             <%
  10. Set cnnSimple = Server.CreateObject("ADODB.Connection")
  11. cnnSimple.Open strDBPath & ";"
  12. Set rstSimple = cnnSimple.Execute("SELECT * FROM languages WHERE (languages.CD='YES') ORDER BY languages.language;")
  13.  
  14. If Err.Number <> 0 Then
  15.  
  16.   Response.Write (Err.Description& "<br><br>")
  17.  
  18.   Response.Write("This means there is most likely a problem with the" & vbCrLf)
  19.   Response.Write("""ConnectionString"" info that you specified.<br>" & vbCrLf)
  20.   response.write (server.MapPath("nada"))
  21.   Response.End
  22.  
  23. End If
  24. On Error GoTo 0
Aug 20 '15 #1
Share this Question
Share on Google+
1 Reply


P: 2
Problem solved, sorta. It was godaddy issue. We installed another database and imported everything to a Mysql 5.0 (rather than 5.5), which allows for direct access.

Then we changed the connection string to the new hosting path and voila, it works.

It’s a temporary fix as who knows when godaddy will stop supporting Mysql 5.0.
Aug 20 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.