Solved

Error using dsn-less connection string between ASP and MySQL

Posted on 2003-10-30
3
351 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 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

Independent Software Vendors: 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 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…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

717 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