Microsoft VBScript 运行时错误 错误 '800a01a8'
缺少对象: 'cn'
/asp/xx.asp,行 13
<%@ Language=VBScript %>
<%
Dim connstr
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& Server.MapPath("tushu.mdb") '驱动器,路径
Set cn=Server.CreateObject("ADODB.Connection")
cn.Open connstr
%>
<%
exec="select *from tushumulu"
Set rs=server.CreateObject("adodb.recordset") '建立recordset对象
rs.open exec,cn,1,1 '利用该对象打开表exec cn 前面有定义
%>
<html>
<head>
<meta http-equ:v="Content-Type" content="text/html;charset=gb2312">
<title>图书目录</title>
</head>
<body>
<%
If rs.EOF And rs.BOF Then
response.write ("暂时还没有文章")
Else
For i=1 To 7
If Not rs.EOF Then
%>
<a href="xx.asp?bh=<%=rs("bh")%>"><%=rs("mc")%></a> <!--'读取xx.asp页面,显示mc 文本-->
<%
rs.MoveNext
End If
next
end if
%>
</body>
</html>