以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  同步行错误  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=170116)

--  作者:9EQ98
--  发布时间:2021/7/13 11:38:00
--  同步行错误
Dim 条件 As String = "Code_Num = \'" & "000>0123" & "\'"
Dim dr As DataRow = DataTables("Shop_List").SQLFind(条件)
If dr IsNot Nothing Then \'如果找到记录
    dr.Load()
End If

为什么执行同步行操作时,会出错???
图片点击可在新窗口打开查看此主题相关图片如下:同步行错误.jpg
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2021/7/13 11:42:00
--  
Dim dr As DataRow = DataTables("Shop_List").Find(条件)
--  作者:9EQ98
--  发布时间:2021/7/13 11:54:00
--  有没有增加下载记录的语句
例如:我已下载了 30条记录到 TABLE
然后通过  DATATABLE 的 SQLFIND 找到了一条记录
把找到的这条记录 追加下载到 TABLE
Dim 条件 As String = "Code_Num = \'" & "101>0123" & "\'"
Dim dr As DataRow = DataTables("Shop_List").SQLFind(条件)
If dr IsNot Nothing Then \'如果找到记录
   如果找到记录,如何追加这条找到的记录,到TABLE("Shop_List")
Else
    OUTPUT.SHOW("未找到记录")
End If

--  作者:有点蓝
--  发布时间:2021/7/13 11:58:00
--  
追加使用appendload:http://www.foxtable.com/webhelp/topics/2276.htm

Dim 条件 As String = "Code_Num = \'" & "101>0123" & "\'"
Dim dr As DataRow = DataTables("Shop_List").Find(条件)
If dr IsNot Nothing Then \'如果找到记录
   dr.load
Else
    DataTables("Shop_List").appendload(条件)
End If