请求帮忙,ASP连接access成功却一直无法操作操作数据库,困扰了两天
运行调试环境为,vista,IIS7.0,access2003,Dreamweaver8
这是连接asp文件,文件名为conn.asp,下面为文件内容:
<%
dim conn
dim connstr
dim db
db="admin/database/db1.mdb"
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.MapPath(db)
set conn=Server.CreateObject("adodb.Connection")
conn.Open connstr
%>
这是调用conn.asp的asp文件,内容如下:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="conn.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>主页面</title>
</head>
<body>
<%
dim rs1,sql
set rs1=server.CreateObject("adodb.recordset")
sql="select * from products"
rs1.open sql,conn,1,1 '此行即为错误提示所指的15行
do while not rs1.eof)
response.Write(rs1("name"))
rs1.movenext
loop
rs1.close
set rs1=nothing
%>
</body>
</html>
此问题困扰我两天了,因为是初学,手上也没什么资料,一直在网上查就是无法找的解决办法,急,心里堵得难受。现在此请教,谢谢大家帮忙了。下面为出错提示内容:
2009-11-17 17:52:19 ::1 GET /myweb/index.asp |15|800a0bb9|参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。 80 - ::1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.0;+SLCC1;+.NET+CLR+2.0.50727;+Media+Center+PC+5.0;+.NET+CLR+3.0.30618;+.NET+CLR+3.5.30729) 500 0 0