修改记录提交后,数据表中的值没有变化

返回ASP技术区
0回复贴,共1页,点击数:2213
我在编写一个修改记录的一个页面,在修改页面中,我对数据进行了修改并提交,提示修改成功,但在浏览页面中记录却没有变化。我查找了很多资料,也没有修改成功。请各位高手帮忙看一下以下代码,哪里出错了。
<%if request("action")="modif" then%>

<form name="form2" action=tbwjbrow.asp?action=edit method=POST>
        <input type="hidden" name="gz" value="">

<div align="center">
<table border="0" width="776" cellspacing="1" bgcolor="#9AC1F8" class="border">
    <tr class="tdbg" >
        <td height="20" colspan="3" style="background-image: url('images/admintoptdbg.gif')">
        <p align="center"><b><font size="3">投标文件资料修改</font></b></td>
    </tr>
    <tr class="tdbg">
      <td height="30" colspan="3" align="left" ><span class="style7"> 当前信息录入提示:由<%=session("admin_dwmc")%>的<%=session("admin_name")%>于<%=date()%>&nbsp;<%=time()%>录入本条信息,其当前IP为: <%=userip1%></span></td>
    </tr>
    
    <tr class="tdbg">
      <td height="30" align="right" nowrap >序号ID:</td>
      <td height="30" nowrap align="left" colspan="2" >
        <font size="3">
        <%=request("id")%> </font></td>
    </tr>
    
    <tr class="tdbg">
      <td height="30" align="right" nowrap ><font size="3">工程类别:</font></td>
      <td height="30" nowrap align="left" colspan="2" >
        <font size="2">
        <input type="text" name="gclb" size="29" style="font-size: 12pt" value="<%=request("gclb")%>"></font></td>
    </tr>
    
    <tr class="tdbg">
      <td height="30" align="right" nowrap ><font size="3">资料名称:</font></td>
      <td height="30" nowrap align="left" colspan="2" >
        <font size="2">
        <input type="text" name="zlmc" size="71" style="font-size: 12pt" value="<%=request("zlmc")%>"></font></td>
    </tr>
    <tr class="tdbg">
        <td width="122" height="30" align="right" nowrap ><font size="3">关键词:</font></td>
        <TD height="30" nowrap width="645" colspan="2" align="left">
        <font size="2">
        <input type="text" name="gjc" size="71" style="font-size: 12pt" value="<%=request("gjc")%>"></font></TD>
    </tr>
    <tr class="tdbg">
      <td height="30" align="left" nowrap colspan="2" >
        <p align="right"><font size="3">时间:</font></td>
      <td height="30" align="right" nowrap >
        <p align="left"><font size="2">
        <input type="text" name="sj" size="11" style="font-size: 12pt" value="<%=request("sj")%>"></font><font size="3">
        年</font></td>
    </tr>
    
    
    <tr class="tdbg">
      <td height="30" align="left" nowrap colspan="2" >
        <p align="right"><font size="3">主要内容:</font></td>
      <td width="463" height="30" align="right" nowrap >
        <p align="left"><textarea rows="28" name="zynr" cols="115"><%=request("zynr")%></textarea></td>
    </tr>
    
    <tr class="tdbg">
        <td height="48" colspan="3" >
          <p align="center">
            <input type=submit value="修   改" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=reset value="重   写" >
      </td>
    </tr>
    
        
    </table>
      </td>
    </tr>
  </table>
</div>
</form>

<%end if%>


<%if request("action")="edit" then%>
<%
dim gclb,zlmc,gjc,zynr,sj,rs2,sql2
gclb=trim(request("gclb"))
zlmc=trim(request("zlmc"))
gjc=trim(request("gjc"))
zynr=trim(request("zynr"))
sj=trim(request("sj"))

set rs2=server.CreateObject("adodb.recordset")
sql2="select * from tbwjk where id="&request("id")&" "
rs2.open sql2,conn,1,3
'rs2.update
rs2("gclb")=gclb
rs2("zlmc")=zlmc
rs2("gjc")=gjc
rs2("zynr")=zynr
rs2("sj")=sj
rs2.update
  response.write"<script>alert('投标文件资料信息修改成功');this.location.href='tbwjbrow.asp?action=fine';</SCRIPT>"
  response.end
   rs2.close
  set rs2=nothing
  %>
  <%end if%>
http://23.81.198.51      http://23.81.197.51      http://23.81.198.180      http://23.81.197.180
http://23.81.198.52      http://23.81.197.52      http://23.81.198.181      http://23.81.197.181
http://23.81.198.53      http://23.81.197.53      http://23.81.198.182      http://23.81.197.182
http://23.81.198.54      http://23.81.197.54      http://23.81.198.183      http://23.81.197.183
http://23.81.198.55      http://23.81.197.55      http://23.81.198.184      http://23.81.197.184
1楼 2013/06/13 14:20
您未登录,没有发贴权限[点此登录]