请大家来看看我的asp代码那里有问题?为什么不能修改?

来源:百度知道 编辑:UC知道 时间:2024/06/06 19:42:26
我的asp源码那里有问题?为什么不能修改表里的数据?也没有错误提示!-求救,在线等!
------------------------我是菜鸟,麻烦说的清楚点!------------------------
表:art 列 art_id art_count

=======================提交修改的源码(modify.asp)===========================
<!--#include file="mdb.asp"-->
<%
exec="select * from art where art_id="&request.querystring("art_id")
set rs=server.createobject("adodb.recordset")
rs.open exec,conn
%>
<form name="form1" method="post" action="modifysave.asp">
<table width="748" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>点击</td>
</tr>
<tr>
<td>
<input type="text" name="count" value="<%=rs("art_count")%>">
</td>
<td>
<

你的程序代码有错误,我在本机建立了数据库和相关数据表,并对你贴出来的程序进行修改后,调试通过,现将代码贴上,修改的部分我写在代码修改的地方。

修改后的代码:
=======================提交修改的源码(modify.asp)===========================
<!--#include file="mdb.asp"-->
<%
exec="select * from art where art_id="&request.querystring("art_id")
set rs=server.createobject("adodb.recordset")
rs.open exec,conn
%>
<form name="form1" method="post" action="modifysave.asp">
<table width="748" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>点击</td>
</tr>
<tr>
<td>
<!--下面这段是我加的,为的是在你modifysave.asp文件中让request.form("art_id")取到值-->
<input type="hidden" value="<%=rs("art_id")%>" name="art_id" />
<!--下面这段是我改的,为的是在你modifysave.asp文件中让request.