请帮我看看这个asp代码哪出错了,这段代码这个代码的作用是接受前面一个页面的ID然后显示这条记录

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><% set conn=server.createobject("adodb.connection") conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("news.mdb") exec="select * from news where id="&request.form("id") set rs=server.createobject("adodb.recordset") rs.open exec,conn %> <form name="form1" method="post" action="updateto.asp"> <table width="748" border="0" cellspacing="0" cellpadding="0"> <tr> <td>新闻标题</td> <td>新闻内容</td> </tr> <tr> <td> <input type="text" name="tit" value="<%=rs("tit")%>"> </td> <td> <input type="text" name="cont" value="<%=rs("cont")%>"> <input type="submit" name="Submit" value="提交"> <input type="hidden" name="id" value="<%=request.form("id")%>"> </td> </tr> </table> </form> <% rs.close set rs=nothing conn.close set conn=nothing %> </body></html>
2026年09月20日 08:51
有3个网友回答
网友(1):

exec="select * from news where id="&request.form("id")
改成:
exec="select * from news where id="&request("id")
**************************************************************************************
">
改成
">

网友(2):

rs.open exec,conn
改成
rs.open exec,conn,1,1

网友(3):

rs.open exec,conn 应该是rs.open exec,conn,1,1吧