百思不得其解,是我代码的问题,还是access数据库的问题
网站原来是sql server数据库,后因需要改成access的,可是原本运行的好好的程序现在报错了,是一段删除记录的程序
<!--#include file="Connection.asp" -->
<%
Response.expires = 0
on error resume next
if Session("right")<1 then
response.end
end if
a=request.form(1)
'读出要删除id的列表
if isnull(a) or len(a)<1 then
response.end
end if
parmarray=split(a,",")
sheet=request("sheet")
'读出要删除的表名
set conn = Server.CreateObject("ADODB.Connection")
conn.open connst
conn.BeginTrans
for i=0 to ubound(parmarray)
sql="delete from " & sheet & " where id='" & parmarray(i) & "'"
conn.execute(sql)
next
if conn.errors.count > 0 then
conn.rollbacktrans
conn.close
set conn = nothing
response.write "<center>写数据库出现异常错误,请再试一次!</center><br>"
response.write "<center><a href='' onclick='history.back(1)'>返回</a></center>"
response.end
else
conn.committrans
conn.close
set conn = nothing
end if
%>
-----------------------
报的错就是:写数据库出现异常错误,请再试一次!,不知道是什么原因,大家帮忙看看,谢谢