Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connection String Giving issues

Status
Not open for further replies.

penguinspeaks

Technical User
Nov 13, 2002
234
US
I am sure an answer is out there somewhere.

We had to upgrade our server to MySql 5.5
Hey wonderful and great. My issue is now my connection strings will not work and I get the following error:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

/inc/connection.asp, line 8

I am using MySql DB within a classic asp environment but I know this is not the problem.

My connection string is as follows:
Code:
<% 
Dim sConnection, objConn , objRS 

sConnection = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=localhost; DATABASE=mydbname; UID=tmyuserid;PASSWORD=mypassword; OPTION=3" 

Set Conn = Server.CreateObject("ADODB.Connection") 

Conn.Open(sConnection) 

%>

I have tried to change the driver to 5.5 with no luck. I know the problem lies with the driver and the version of MySql.
I have tried over a dozen different strings but all give the same result.
Any Ideas?
 
this does not look like a mysql issue.

however if it helps I always use a system DSN rather than 'dsnless' dsn. i find i avoid problems that way.

one other gotcha is that the mysql odbc driver is 32 bit only so to get access to it you will need to run the 32 bit odbc plugin. the default plugin that runs is 64 bit.
 
Thanks for the reply. I feel like a novice since I have found the issue.

First I needed to do this:
Code:
sConnection = "DRIVER={MySQL ODBC 5.2 Driver};

Then I needed to actually grant permissions on the odbc folder that contained the .dll file for the driver.

Doing both of these now gives me a good string and connection.

Thanks again!
 
well found!

setting up a system or file DSN in the plugin avoids those issues. Just FYI,
 
Well I am back.

I had to move the VPS from godaddy to another. They just aren't used to dealing with windows servers I guess but anyway.

I am having issues again with the same error. The same fix I performed last time did not work this time.

I am not versed in DSN connections and would like to know if someone can steer me in the right direction.
What I don't know is.... the dsn is the same as a dsn nameserver?


 
DSN nameserver???

Do you mean DNS nameserver


If so, they are both absolutely, totally. different things entirely.


DSN == Data Source Name

DNS == Domain Name System.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Why yes, I did get those confused.

It has been a long week.

So what exactly is the dsn then? just the database name?
 
dsn is the tconnection to a database (literally: data source name). It is most often used by abstraction layers such as odbc.

please use the windows snap-in. it makes life so much easier.

but if the connection string itself does not work the most likely reason is that the drivers are not installed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top