帮忙看看access的连接错误阿!急阿
asp文件全文:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Set Cnn = Server.CreateObject("ADODB.connection")
set rs=Server.Createobject("ADODB.Recordset")
CnnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("result.mdb")
response.Write(CnnStr)
Cnn.open CnnStr
rs.open "Select * From record"
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
</body>
</html>
错误:
Error Type:
ADODB.Recordset (0x800A0E7D)
The connection cannot be used to perform this operation. It is either closed or invalid in this context.
如果没有rs.open "Select * From record"
网页就不会报错
似乎也不会是数据库的问题,因为我曾经把数据库放在别的地方,或是用别的数据库测试都是这样的错误。
大家帮我看看可能的原因吧。谢谢啦