#12003/7/26 11:04:04
我写了一段数据添加的代码:
.....
dim cpmc,cpjj,cpcf,yfyl,gnzz,jg
cpmc=request.Form("cpmc")
cpjj=request.Form("cpjj")
cpcf=request.Form("cpcf")
yfyl=request.Form("yfyl")
gnzz=request.Form("gnzz")
jg=request.Form("jg")
'response.Write("wangcheng!")
sql="select * from sub "
set rs=conn.execute(sql)
rs.addnew
rs.("cateid")=replace(rs.field("cateid").count+1,"'","")
rs.("subid")= replace(rs.field("subid").count+1,"'","")
rs("cpmc")=replace(cpmc,"'","")
rs("cpjj")=replace(cpjj,"'","")
rs("cpcf")=replace(cpcf,"'","")
rs("gnzz")=replace(gnzz,"'","")
rs("yfyl")=replace(yfyl,"'","")
rs("jg")=replace(jg,"'","")
rs.update
response.Write("产品已经进入数据库了!谢谢!")
.....
如果删除
rs.("cateid")=replace(rs.field("cateid").count+1,"'","")
rs.("subid")= replace(rs.field("subid").count+1,"'","")
页面报错如下
错误类型:
ADODB.Recordset (0x800A0CB3)
当前记录集不支持更新。这可能是提供程序的限制,也可能是选定锁定类型的限制。
请问是什么原因?cateid,subid都是文本型的。