asp如何对欲删除的记录确认后再删除?

时间:2009-11-20 18:48:00 

看看这个指令在ASP程序中的应用,有[delete from 歌手 where 艺名='cs2000'],删除艺名为cs2000的记录:

<%
set conn1=server.createobject("adodb.connection")
conn1.open"driver={sql server};server=(local);uid=sa;pwd=;database=地域"
sql="delete from 歌手 where 艺名='cs2000'"
set a=conn1.execute(sql)
set rs3=server.createobject("adodb.recordset")
sql="select * from 歌手 order by 种类 desc"
rs3.open sql,conn1,3,3
%>
<table colspan=8 cellpadding=5 border=0>
<tr>
<td align=center bgcolor="#800000"><font color="#FFFFFF">艺名
</font></td>
<td align=center bgcolor="#800000"><font color="#FFFFFF">原名
</font></td>
<td align=center bgcolor="#800000"><font color="#FFFFFF">年龄
</font></td>
<td align=center bgcolor="#800000"><font color="#FFFFFF">艺龄
</font></td>
</tr> 
<% do while not rs3.eof%>
<tr>
<td bgcolor="f7efde" align=center><%=rs3("艺名")%></td>
<td bgcolor="f7efde" align=center><%=rs3("原名")%></td>
<td bgcolor="f7efde" align=center><%=rs3("年龄")%></td>
<td bgcolor="f7efde" align=center><%=rs3("艺龄")%></td>
</tr>
<%
rs3.movenext
loop
rs3.close
conn1.close
%>
</table>

在用户端浏览器,我们可以看到执行的结果,代码号为cs2000的记录被删除了。

标签:删除,确认,asp
0
投稿

猜你喜欢

  • 分享101个MySQL调试与优化技巧

    2024-01-20 23:36:58
  • Vue不能检测到Object/Array更新的情况的解决

    2024-05-09 15:14:32
  • 使用CSS3和RGBa创建超酷的按钮

    2009-06-02 12:41:00
  • 使用IDEA回滚某次提交的代码步骤

    2023-06-21 03:15:28
  • python读取当前目录下的CSV文件数据

    2022-04-06 16:50:35
  • Python+OpenCV图像处理—— 色彩空间转换

    2022-02-12 16:28:01
  • mysql存数组的实例代码和方法

    2024-01-23 22:45:21
  • 小程序实现横向滑动日历效果

    2024-04-10 16:19:46
  • python右对齐的实例方法

    2022-01-15 20:59:52
  • 详解pandas中Series()和DataFrame()的区别与联系

    2023-06-24 23:05:46
  • pandas DataFrame 警告(SettingWithCopyWarning)的解决

    2023-08-20 07:45:31
  • 解决windows下python3使用multiprocessing.Pool出现的问题

    2021-11-03 23:34:37
  • ASP连接Oracle数据库的例子

    2007-10-02 12:44:00
  • Python还能这么玩之用Python修改了班花的开机密码

    2023-11-23 17:38:40
  • Python数据可视化教程之Matplotlib实现各种图表实例

    2021-08-19 01:18:10
  • Git 教程之服务器搭建详解

    2022-07-28 06:44:20
  • vuex 如何动态引入 store modules

    2024-04-30 08:45:44
  • 浅谈Python接口对json串的处理方法

    2022-07-30 13:03:49
  • Oracle 数据库中创建合理的数据库索引

    2009-07-02 12:31:00
  • opencv+python识别七段数码显示器的数字(数字识别)

    2022-03-03 00:01:51
  • asp之家 网络编程 m.aspxhome.com