哎,这么简单的问题不会,真想撞墙,哪位给我改改??

ariqi 2005-12-25 08:56:23
<%
dim dbconnection
set dbconnection=Server.CREATEOBJECT("ADODB.CONNECTION")
DBPath = Server.MapPath("Test.mdb")
dbconnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
SQL="select * from TblId"
SET uplist=dbconnection.EXECUTE(SQL)
%>


<form method=post enctype="multipart/form-data" name=8009 action="http://192.168.5.11/show.asp" target="8009">

<input type=text name=identid size="18" maxlength=18 value='<%Response.Write(uplist("IDNum")) %>'>
<input type="submit" name=vote value=提交>
</form>
<%
uplist.Delete
uplist.MoveNext
dbconnection.Close
Set dbconnection=Nothing
%>

就是从access库里读取一个字段,然后显示出来,最后删除这么一个流程,
库名字叫 Test, 表名字叫:TblID 字段名字叫 IDNum。哪位能给我改改?
...全文
131 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
oomen 2005-12-26
  • 打赏
  • 举报
回复
<!-- #include file="ADOFunctions.asp" -->
<HTML>
<BODY>


<%
Title = Request("name")
strSQL = "SELECT * FROM 成绩单 WHERE 姓名='" & Title & "' "
Set objRS = GetSQLRecordset(strSQL, "GRADES.mdb", "成绩单")
objRS.delete
%>




数据删除完毕
<% response.redirect"query3.asp"%>

<%
'关闭数据库连接并释放对象
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
%>
</BODY>
</HTML>
lonaerd 2005-12-26
  • 打赏
  • 举报
回复
循环语句都没有,怎么还有.next ?

<input type=text name=identid size="18" maxlength=18 value='<%Response.Write(uplist("IDNum")) %>'>
<input type="submit" name=vote value=提交>
</form>
<%
uplist.Delete
uplist.MoveNext
dbconnection.Close


改为:
<%while not uplist.eof%>
<input type=text name=identid size="18" maxlength=18 value='<%=uplist("IDNum") %>'>
<%

uplist.MoveNext
wend
dbconnection.Close
%>
<input type="submit" name=vote value=提交>
</form>
zhanghongwen 2005-12-26
  • 打赏
  • 举报
回复
UP
LoveCherry 2005-12-25
  • 打赏
  • 举报
回复
recordset呢
doveph 2005-12-25
  • 打赏
  • 举报
回复
如楼上,应该说的清楚点。。。
MYLiao 2005-12-25
  • 打赏
  • 举报
回复
不清楚楼主的程序逻辑,说明白点吧。
KimSoft 2005-12-25
  • 打赏
  • 举报
回复
楼主是要显示一条改一条,还是显示全部?
molocha 2005-12-25
  • 打赏
  • 举报
回复
<%
dim dbconnection
set dbconnection=Server.CREATEOBJECT("ADODB.CONNECTION")
DBPath = Server.MapPath("Test.mdb")
dbconnection.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
SQL="select * from TblId"
SET uplist=dbconnection.EXECUTE(SQL)
if request.form("identid")<>"" then
uplist.Delete
uplist.MoveNext
end if
%>


<form method=post enctype="multipart/form-data" name=8009 action="http://192.168.5.11/show.asp" target="8009">

<input type=text name=identid size="18" maxlength=18 value='<%Response.Write(uplist("IDNum")) %>'>
<input type="submit" name=vote value=提交>
</form>
<%
dbconnection.Close
Set dbconnection=Nothing
%>

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧