日期:2014-05-17  浏览次数:21268 次

请教各位大侠关于修改记录问题
有2个网页一个是a.asp一个是b.asp
在a.asp里点击   <a   href= "index_xiu1.asp?id= <%=rs( "id ")%> "> 修改 </a>   进入b.asp中进行修改
<%
set   conn=server.createobject( "adodb.connection ")
conn.open   "driver={microsoft   access   driver   (*.mdb)};dbq= "&server.mappath( "kehu.mdb ")
id   =   Trim(request.QueryString( "id "))
exec= "select   *   from   01   where   id= "&request.QueryString( "id ")
set   rs=server.createobject( "adodb.recordset ")
rs.open   exec,conn,1,3
rs( "N ")=request.QueryString( "N ")
rs( "Q ")=request.QueryString( "Q ")
rs( "J ")=request.QueryString( "J ")
rs.update
rs.close
set   rs=nothing
conn.close
set   conn=nothing
%>

<style   type= "text/css ">
<!--
.STYLE8   {font-family:   "宋体 ";   font-size:   12px;   font-weight:   bold;   }
-->
</style>

<form   name= "form1 "   method= "post "   action= " ">
<table   width= "80% "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
<tr>
    <td   width= "25% "> 编号 </td>  
<td   width= "25% "> <span   class= "STYLE8 "> 公司名称 </span> </td>
<td   width= "25% "   height= "20 "> <span   class= "STYLE8 "> 签约时间 </span> </td>
<td   width= "25% "> <span   class= "STYLE8 "> 结束合作时间 </span> </td>
</tr>
<tr>
    <td   width= "25% "> <input   type= "text "   name= "id "   value= " <%=rs( "id ")%> "> </td>  
<td   width= "25% ">
<input   type= "text "   name= "N "   value= " <%=rs( "N ")%> "> </td>
<td   width= "25% ">
<input   type= "text "   name= "Q "   value= " <%=rs( "Q ")%> "> </td>
<td   width= "25% ">
<input   type= "text "   name= "J "   value= " <%=rs( "J ")%> ">
<input   type= "submit "   name= "Submit "   value= "提交 ">
<input   type= "hidden "   name= "id "   value= " <%=request.QueryString( "id ")%> "> </td>
</tr>
</table>
</form>
<%
rs.close
set   rs=nothing
conn.close
set   conn=nothing
%>
进入b.asp后说我类型不对请问各位大侠如何修改.我的想法是从a.asp里传来一个id号,到了b.asp后传来的id号和数据库中的id是一样的就显示出它的内容对它进行修改,然后提交就在本页直接修改完成.

------解决方案--------------------
rs.close
set rs=nothing
。。。。。。。。。。。。。。。。
rs.close
set rs=nothing