Link to home
Start Free TrialLog in
Avatar of dominantmale
dominantmale

asked on

Error using dsn-less connection string between ASP and MySQL

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


ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dominantmale
dominantmale

ASKER

Hi Gary

Thanks That worked
That's great, just accept my comment as an answer, thanks