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 .Connectio n")
conn.OPen
= "driver=MySql;server=local host;uid=w edge;pwd=w edge;datab ase=addres s"
%>
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
<%@ LANGUAGE="VBSCRIPT" %>
<%
Dim conn
Set conn = Server.CreateObject("ADODB
conn.OPen
= "driver=MySql;server=local
%>
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That's great, just accept my comment as an answer, thanks
ASKER
Thanks That worked