level 1
200903013
楼主
这是我的代码
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
set conn=server.CreateObject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("news.mdb")
exec="select * from news"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<table>
<%do while not rs.eof%><tr>
<td>
<a href=show.asp?id="&rs("ID")&" target=_blank><%=rs("title")%></a>
</td>
</tr>
<%rs.movenext
loop
%>
</table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
</body>
</html>
错误提示:
Microsoft OLE DB Provider for ODBC Drivers 错误
*800401f3*
ODBC 驱动程序不支持所需的属性。
/shownews.asp,行 8
就是rs.open exec,conn,1,1这句
改成1,3仍旧有错
2014年10月15日 13点10分
1
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%
set conn=server.CreateObject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.MapPath("news.mdb")
exec="select * from news"
set rs=server.createobject("adodb.recordset")
rs.open exec,conn,1,1
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<table>
<%do while not rs.eof%><tr>
<td>
<a href=show.asp?id="&rs("ID")&" target=_blank><%=rs("title")%></a>
</td>
</tr>
<%rs.movenext
loop
%>
</table>
<%rs.close
set rs=nothing
conn.close
set conn=nothing%>
</body>
</html>
错误提示:
Microsoft OLE DB Provider for ODBC Drivers 错误
*800401f3*
ODBC 驱动程序不支持所需的属性。
/shownews.asp,行 8
就是rs.open exec,conn,1,1这句
改成1,3仍旧有错