我觉得这个相当与一个修改的功能。获取数据库的字段,然后用更新语句更新并提交到数据库。我这里有一个修改的代码,你参考把!
<%
sql="select * from type1 where id="&trim(request("id"))
set rs=conn.execute (sql)
if request("ctype")="types" then
sqlfind="select * from type1 where 题目='"&trim(request("t1"))&"' and 正确答案="&request("cate")&" and id<>"&request("id")
set rss=conn.execute(sqlfind)
if not rss.eof then
%>
<script language=javascript>
alert("已有此试题!");
history.back();
</script>
<%else
sqledit="update type1 set 题目='"&trim(request("t1"))&"',正确答案='"&request("cate")&"',加入日期='"&date()&"' where id="&request("id")
set rss=conn.execute(sqledit)
%>
<script language=javascript>
alert("试题修改成功!");
var now=new Date();
window.navigate("type_1.asp?time="+now.getTime());
</script>
<%end if
end if %>