以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [讨论]不能是自己的数据源问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=133600) |
-- 作者:zyqzyy -- 发布时间:2019/4/17 9:44:00 -- [讨论]不能是自己的数据源问题 不能是自己的数据源问题:更新400条记录以内正常,400条记录后就提示下面的问题,如何解决? (不能附件添加,图片上传不了) 函数如下: Dim tb As String = args(0) Dim key As String = args(1) Dim cmd As New SQLCommand Dim dt As DataTable cmd.C cmd.CommandText = "S ELECT * From {" & tb & "}" dt = cmd.ExecuteReader() Dim l As WinForm.Label = Forms("拷贝").Controls("Label1") Dim i As Integer l.Text = i For Each dr As DataRow In dt.DataRows i += 1 l.Text = i If DataTables(tb).Find(key & " = \'" & dr(key) & "\'") Is Nothing Then Dim nr As DataRow = DataTables(tb).AddNew() For Each dc As DataCol In dt.DataCols nr(dc.name) = dr(dc.name) Next nr.Save() Else For Each dc As DataCol In dt.DataCols \'nr(dc.name) = dr(dc.name) DataTables(tb).ReplaceFor(dc.name, dr(dc.name) , key & "= \'" & dr(key) & "\'") Next DataTables(tb).Save() End If Next msgbox("OK")
[此贴子已经被作者于2019/4/17 9:49:56编辑过]
|
-- 作者:有点甜 -- 发布时间:2019/4/17 10:50:00 -- 代码看着没问题,贴出出错的提示
http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=78
|