asp数据库为何连接不起来?与教材上说的对不上。为什么?
请看代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<%
Set conn=server.CreateObject("adodb.connection")
conn.open "driver={microsort access driver
(*.accdb)};dbq="&server.mappath("guestbook.accdb")
%>
<%
exec="select * from guestbook"
Set rs=server.CreateObject("adodb.recordset")
rs.open exec,conn,1,1
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<% Do While Not rs.eof %>
<tr height="2">
<td><%=rs("username")%></td>
<td><%=rs("tel")%></td>
<td><%=rs("message")%></td>
<td><%=rs("time")%></td>
</tr>
<%
rs.movenext
Loop
%>
</table>
</BODY>
</HTML>