Solved

Error using dsn-less connection string between ASP and MySQL

Posted on 2003-10-30
3
349 Views
Last Modified: 2012-05-04
I am trying to connect to MySql with the following code:

<%@ LANGUAGE="VBSCRIPT" %>

<%
 
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.OPen
= "driver=MySql;server=localhost;uid=wedge;pwd=wedge;database=address"

%>

I receive the following error:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/asptest/intro.asp, line 14


I have created a sytem DSN and the script works when I use it i.e.

conn.OPen = "dsn=mysql_dsn"

but I would prefer the connection to be DSN-Less


0
Comment
Question by:dominantmale
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 9655900
Try this, but make sure you have the latest drivers for MySQL
conn.open= "driver={MySQL ODBC 3.51 Driver};server=localhost;uid=;pwd=;database=dbName;Option=16387;"
0
 

Author Comment

by:dominantmale
ID: 9655939
Hi Gary

Thanks That worked
0
 
LVL 58

Expert Comment

by:Gary
ID: 9655952
That's great, just accept my comment as an answer, thanks
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with stored procedure 30 64
SQL Server Web Traffic Limitations 4 60
Response.Flush in Classic ASP causing TIME_WAIT ports 9 95
ASP CDO - Limiting Connections 2 50
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now