Forum Moderators: open
"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/mysqltest.asp, line 6"
the error is generated from the following code:
"<%
dim adoConn
dim adoRS
set adoConn = Server.CreateObject("ADODB.Connection")
set adoRS = Server.CreateObject("ADODB.Recordset")
adoConn.Open "Driver={MySQL ODBC 3.51 Driver}; Server=192.168.1.117; Port=3306; Option=0; Socket=; Stmt=; Database=dot; Uid=user; Pwd=password;"
adoRS.ActiveConnection = adoConn
if adoConn.errors.count = 0 then
adoRS.Open "select * from log"
end if
adoRS.Close
adoConn.Close
Set adoRS = nothing
Set adoConn = nothing
%>"
anyone know what's wrong with this?
thanks in advance,
Mike
<%@ LANGUAGE="VBSCRIPT" %>
<%
dim conn
conn_string = "Driver={MySQL};Server=192.168.1.166;Port=3306;Option=131072;Stmt=;Database=db;Uid=monty;Pwd=password"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open(conn_string)
strQuery = "SELECT * FROM log;"
Set RS = adoDataConn.Execute(strQuery)
%>
<html>
<head>
<title>this is the results page</title>
</head.
<body>
<b>This is the result set</b>
<br>
<%while not RS.eof%>
<%=RS("ip")%> <%=RS("referer")%><br>
<%RS.MoveNext%>
<%wend%>
<%
RS.Close
conn.Close
%>
</body>
</html>
<%@ LANGUAGE="VBSCRIPT" %>
<%
dim conn
dim conn_string
conn_string = "Driver={MySQL};Server=192.168.1.166;Port=3306;Database=db;Uid=monty;Pwd=password"
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open(conn_string)
strQuery = "SELECT * FROM log;"
Set RS = conn.Execute(strQuery)
%>
<html>
<head>
<title>this is the results page</title>
</head.
<body>
<b>This is the result set</b>
<br>
<%while not RS.eof%>
<%=RS("ip")%> <%=RS("referer")%><br>
<%RS.MoveNext%>
<%wend%>
<%
set rs = nothing
RS.Close
conn.Close
%>
</body>
</html>
"Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/test3.asp, line 10"
test3.asp contains the exact source from above
any other ideas?
thanks for all your help,
Mike
MySQL site [mysql.com]
After you grant privileges, don't forget to try "Driver={MySQL ODBC 3.51 Driver};", I think that is the correct way.
Are there any permissions in IIS that could prevent the use of DSN's?
thanks for everyone's continued help,
Mike
If you have not done so, I would read the MySQL windows installation documentation [mysql.com] very carefully, before proceeding.