index.asp文件的代码
<% @language=vbscript %>
<!--#include file="conn.asp"-->
<%
set cn1=server.createobject("adodb.connection")
cn1.open conn
set rs=server.createobject("adodb.recordset")
rs.activeconnection=cn1
sql="select * from zhuti"
rs.open sql,cn1
%>
<html>
<body>
<table width="90%" align="center" border=1 cellpadding=0 cellspacing=0 bordercolorligth="#FFFFFF">
<tr height="35">
<td align="center">主题</td>
<td align="center">版主</td>
<td align="center">简介</td>
</tr>
<%
do while (not rs.eof)
response.write "<tr>"
response.write "<td align=center>"<% rs("zhuti") %>"</td>"
response.write "<td align=center>"<% rs("banzhu") %>"</td>"
response.write "<td align=center>"<% rs("jianjie")%>"</td>"
response.write"</tr>"
rs.movenext
loop
rs.close
set rs=nothing
cn1.close
set cn1=nothing
%>
</table>
</body>
</html>
conn.asp文件的代码
<%
conn = "driver={microsoft access driver (*.mdb)}; dbq="& server.mappath("ceshi.mdb")
%>
为什么总是提示错误,究竟是那里出了问题?
数据库记录显示问题?