一个奇怪的ASP更新问题,望大家可以共同研究个中缘由!小弟在线恭候
有个奇怪的ASP更新问题(数据库 ACCESS),修改同一个数据表的数据,有些记录的所有项目都可以修改,有些记录却任何一个项目都无法更改。这是什么原因? 欢迎加我私 QQ:149366914 (注明来自ASP论坛)
下面为 更新 代码
case "edit" spic=request.form("spic") Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set rs= Server.CreateObject("ADODB.Recordset") rs.open"select * from product where ID ="&id,conn,1,3 if rs("spic")<>spic then'当前小图地址与记录不同时,执行删除操作 F_filename=rs("spic") IF F_filename = "../images/buynopic.gif" Then F_filename = "" End If if objFSO.fileExists(Server.MapPath(F_filename)) then objFSO.DeleteFile(Server.MapPath(F_filename)) end if end if' 图片检测工作完成,开始执行修改命令 For i = 1 To Request.Form("detail").Count strDetail = strDetail & Request.Form("detail")(i) Next '*************************************************************** rs("name")=trim(request.form("name")) rs("bigclassid")=bigclassid rs("smallclassid")=smallclassid rs("mark")=pid rs("introduce")=trim(request.form("introduce")) rs("price1")=price1 rs("price2")=price2 rs("price3")=price3 rs("spic")=trim(request.form("spic")) rs("categoryid")=categoryid rs("productdate")=productdate rs("discount")=discount rs("score")=trim(request.form("score")) rs("grade")=trim(request.form("grade")) rs("type")=trim(request.form("type")) rs("recommend")=trim(request.form("recommend")) rs("detail")=strDetail rs("code")=trim(request.form("code")) rs("pweight")=trim(request.form("pweight"))'包装 rs("adddate")=now rs("solded")=0 rs("viewnum")=0 rs("rank")=0 rs("ranknum")=0 rs("OtherProperty1")=trim(request.form("OtherProperty1")) rs("OtherProperty2")=trim(request.form("OtherProperty2")) rs("OtherProperty3")=trim(request.form("OtherProperty3")) rs("OtherProperty4")=trim(request.form("OtherProperty4")) rs("OtherProperty5")=trim(request.form("OtherProperty5")) rs("tj")=tj rs.update rs.close set rs=nothing response.Write "<script language=javascript>alert('修改成功!');history.go(-1);</script>" response.End |