PDA

View Full Version : mysql using .asp "I'm a newbie...be gentle"


ultra1
08-15-2009, 07:19 PM
Hello I'm using mysql for .asp
Like the title of my post says, I'm new at .asp & mysql so. All I know is I have this error..

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/common/db/openDB.asp, line 8

now I found opendb.asp & it says..

full file:
<% Sub openDb()

if varType(connTemp)=0 or varType(connTemp)=1 then

' create the connection
set connTemp = server.createObject("adodb.connection")

connTemp.Open pDatabaseConnectionString

if err.number <> 0 then response.redirect "/manager/error/supportError.asp?supportError="&Server.Urlencode("Error while opening DB read:"&Err.Description& "<br><br><b>Common solutions</b><br><br>1. Check that you haven't change default database path and name <br>2. Check that your web server has Access 97 or 2000 ODBC installed <br>3. Check that you have read, modify and delete permissions over database folder and database file <br>4. Open your database with Access program and select Repair Database option <br>5. Select other connection method like other connection string or DSN")
end if

end if

End Sub %>
_________________________________

when I tested in internet explorer I get,
HTTP 500 - Internal server error

I also looked at localhost code on settings.asp I see the part with user and passwords.. Do I need to change this file to my new servers IP? or leave it alone?

my issue is the page will not load and Im scared I may of messed it up more..
tech support said.. it's cause I have no database..
then what do I do to make one?

4 hours later
http://localhost/ does not work.
Happened after atempting OBDC drivers, or when I change folder permissions and now I have messed up my localhost from working at all through mysql.
I'm guessing I need a lot of help, so if anyone can please help!!!
I'd be so grateful.

THx

Old Pedant
08-16-2009, 12:43 AM
You can't use the Microsoft drivers with MySQL.

You must use the MyODBC driver (or I think there is now a MyOLEDB driver or equivalent...but MyODBC has been around a long time and works).

Yes, I would *not* expect localhost to work on any shared web hosting system. You should ask your web host for the proper connection string for MySQL. And if they can't give it to you, find a web host that can.

If tech support says you have no database, they are probably telling you the truth. You can't just copy files to set up a MySQL DB; you have to import the data. Again, your web host *should* give you the tools for doing this.

Also, fix your browser:
Click on TOOLS menu
Click on INTERNET OPTIONS menu item
Click on ADVANCED tab
*UN*check "Show friendly HTTP error messages"
OK

Now you will hopefully see more meaningful error messages in your browser instead of the useless "Internal server error" crap. How MS justifies calling those message "friendly" is beyond me.