?
Solved

Error using dsn-less connection string between ASP and MySQL

Posted on 2003-10-30
3
Medium Priority
?
359 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 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