電子工業出版社 JEUISHING HOUSE DF ELECTRONCS INDSTR <Sele_ dele record.htm>源程序 < Option Explicit %><% 建立一个到数据源的连接 strDSN="Provider=MSDASQL: DRIVER=SQL rver): SERVER=127. 0. 0. 1: DATABASE=Demo: UID=chen; PWD=123 Set conn Demo Server CreateObject("ADODB Connection") 建立记录集,存放查询结果 Dim strSqlSelectUsers Set rsUsers Server CreateObject("ADODB. Recordset") strSqlselectUsers= SELECT FROM users rsUsers. Open strSqISelectUsers, connDemo > 一结果输出,以供选择 <html> metahttp-equiv=content-typecontent=text/html:charset=gb2312> < title>基础模块“删除记录”之“选择记录”</ title〉 <body bgcolor=#COCco"> font face="华文行楷”size="6">选择记录</ font></hl <h3>请选择要删除的记录:</h3 If Not rsusers. Eof then Form me thod="post action=delete record. asp> Ktable border="l" cellpadding=8 cellspacing=0 width=342> < th width="70″>姓名《/th < th width="121″>电话√/th> < th width="143″>电子邮箱</th> <th</th><Sele_dele_record.htm>源程序: <% Option Explicit %><% '建立一个到数据源的连接 Dim strDSN Dim connDemo strDSN="Provider=MSDASQL;DRIVER={SQL Server};SERVER=127.0.0.1;DATABASE=Demo;UID=chen;PWD=123" Set connDemo = Server.CreateObject("ADODB.Connection") connDemo.Open strDSN '建立记录集,存放查询结果 Dim rsUsers Dim strSqlSelectUsers Set rsUsers = Server.CreateObject("ADODB.Recordset") strSqlSelectUsers="SELECT * FROM users" rsUsers.Open strSqlSelectUsers, connDemo %> <!--结果输出,以供选择--> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>基础模块“删除记录”之“选择记录”</title> </head> <body bgcolor="#C0C0C0"> <p> <font face="华文行楷" size="6">选择记录</font></h1> </p> <h3>请选择要删除的记录:</h3> <% If Not rsUsers.Eof Then %> <form method="post" action="delete_record.asp"> <table border="1" cellpadding="8" cellspacing="0" width="342"> <tr> <th width="70" >姓名</th> <th width="121" >电话</th> <th width="143" >电子邮箱</th> <th></th> </tr>