| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1900 人关注过本帖
标题:修改记录提交后,数据表中的值没有变化
取消只看楼主 加入收藏
bmydna
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2006-6-1
结帖率:80%
收藏
已结贴  问题点数:10 回复次数:1 
修改记录提交后,数据表中的值没有变化
我在编写一个修改记录的一个页面,在修改页面中,我对数据进行了修改并提交,提示修改成功,但在浏览页面中记录却没有变化。我查找了很多资料,也没有修改成功。请各位高手帮忙看一下以下代码,哪里出错了。
<%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" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F6FcF9'">
      <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" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F6FcF9'">
      <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" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F6FcF9'">
      <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" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F6FcF9'">
      <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" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F6FcF9'">
        <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" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F6FcF9'">
      <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" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F6FcF9'">
      <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" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#F6FcF9'">
        <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%>
搜索更多相关主题的帖子: border action request 记录 
2013-05-27 10:35
bmydna
Rank: 1
等 级:新手上路
帖 子:29
专家分:0
注 册:2006-6-1
收藏
得分:0 
回复 2楼 hu9jj
测试过了,还是不行,不知是哪里出了问题。
2013-05-28 09:15
快速回复:修改记录提交后,数据表中的值没有变化
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016987 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved