以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 如何高速删除指定表里所有行? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=132070) |
-- 作者:爱好所有 -- 发布时间:2019/3/13 11:01:00 -- 如何高速删除指定表里所有行? 我有个项目里有24个表,其中有20个表要经常导入数据后删除表里所有行,但用下面代码效率很慢,有没有快速的方法? dim aa() as string = {"a","b","c","d"} for each i as datatable in datatables for each uu as string in aa if i.name = uu then i.deletefor("") end if next next
|
-- 作者:有点甜 -- 发布时间:2019/3/13 11:13:00 -- Dim aa() As String = {"a","b","c","d"} For Each t As DataTable In DataTables If array.Indexof(aa, t.name) >= 0 Then t.DataRows.Clear End If Next |