标题:怎么改才能实现更新?
只看楼主
selflxs
Rank: 1
等 级:新手上路
帖 子:46
专家分:0
注 册:2006-3-27
 问题点数:0 回复次数:0 
怎么改才能实现更新?

本人用的是LISTBOX控件:
Dim conn As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & Server.MapPath("wwwlink.mdb"))
conn.Open()
Dim strsql As String
strsql = "select * from adder"
Dim cmd As New OleDbCommand(strsql, conn)
Dim adp As OleDbDataReader = cmd.ExecuteReader
Dim i As Integer
For i = 0 To dirctList.Items.Count - 1
If dirctList.Items(i).Selected = adp.Read Then

strsql = " update adder set body= '" & Editname.Text & "' where body=' " & dirctList.Items(i).Text & " '"

End If
Next
cmd = New OleDbCommand(strsql, conn)
adp.Close()
cmd.ExecuteNonQuery()
conn.Close()
Call DataBnd()

搜索更多相关主题的帖子: source 
2006-03-28 18:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-53494-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.631843 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved