asp连接mysql 报错
kwj 2008-11-21 01:34:28 下面的一段代码报如下错误,望高人指点迷津
Microsoft VBScript 编译器错误 error '800a0409'
未结束的字符串常量
/kwj/connmysql.asp, line 9
<html>
<head>
<title>MySQL连接测试</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
strconnection="dsn=mysqltest;
Driver={MySQL ODBC 5.1 Driver};
server=localhost;uid=root;pwd=root;database=test"
set conn = server.createobject("adodb.connection")
conn.open strconnection
sql = "select * from user"
set rs = conn.execute(sql)
if not rs.bof then
%>
<table width="167">
<tr>
<td width="76"><b>name</b></td>
<td width="79"><b>sex</b></td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td><%=rs("name")%></td>
<td><%=rs("sex")%></td>
</tr>
<%
rs.movenext
loop
%>
</table>
<%
else
response.write("sorry, no data found.")
end if
rs.close
conn.close
set conn = nothing
set rs = nothing
%>
</body>
</html>