Solved

Error using dsn-less connection string between ASP and MySQL

Posted on 2003-10-30
3
346 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
Comment Utility
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
Comment Utility
Hi Gary

Thanks That worked
0
 
LVL 58

Expert Comment

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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

12 Experts available now in Live!

Get 1:1 Help Now