恋姐倾心动画下载:asp一个小错误

来源:百度文库 编辑:高校问答 时间:2024/05/01 19:03:02
Provider 错误 '80020005'

类型不匹配。

/admin/saveaddpro.asp,行93

请问朋友们这是怎么回事?该怎么处理?
81: set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from product where id="&id,conn,3,3
rs("name")=trim(request("name"))
rs("company")=trim(request("company"))
rs("mark")=trim(request("mark"))
rs("intro")=trim(request("intro"))
rs("introduce")=trim(request("introduce"))
rs("predate")=trim(request("predate"))
90: rs("price")=trim(request("price"))
91: rs("price1")=trim(request("price1"))
92: rs("price2")=trim(request("price2"))
93: rs("vipprice")=trim(request("vipprice"))
rs("other")=trim(request("other"))
rs("pic")=trim(request("pic"))
我上传到空间上后是93行有错误,在我的机子上运行时出现下边的错误提示

错误类型:
Microsoft JET Database Engine (0x80040E09)
不能更新。数据库或对象为只读。
/admin/saveaddpro.asp, 第 84 行

把那行前后的代码贴上来

84行出错的话,先看看数据库文件的属性是不是只读的
如果是ASESS数据库,就点右键看那个ACESS文件的属性
如果是MS SQL,就看MDF文件和LDF文件是不是成只读属性了
93行出错的话,rs("vipprice")=trim(request("vipprice"))
看看数据库里vipprice这项是什么类型的,要和表单里提交的vipprice的类型一致,一般改成文本类型就没问题了

user_class=session("user_class")
custname=session("custname")
if user_class="个人会员" then
sql="select * from persion where custname='"&custname&"'"
else
sql="select * from company_user where custname='"&custname&"'"
end if
dim rs_user
set rs_user=server.CreateObject("adodb.recordset")
rs_user.open ,sql,conn_in,1,3
if rs_user.bof and rs_user.eof then
response.write"暂时没有记录!"
end if
company=rs_user("company")
company_class=rs_user("company_class")
phone=rs_user("phone")
fax=rs_user("fax")
address=rs_user("address")
zipnumb=rs_user("zipnumb")
email=rs_user("email")
mobile=rs_user("mobile")
manger=rs_user("manger")
%>

看下id
你可以这样写sql语句实验下
rs.Open "select * from product where id="&cint(id),conn,3,3
然后看下数据库是不是只读的
然后把rs("pic")=trim(request("pic"))
后面,也就是所有设置后面加上一个语句:
rs.update
rs.close

那就是类型不对了。
你用数据库里面的日期类型去等于一个字符型的变量,一定会出问题。
检查一下你的代码里面是否出现类似的问题。