Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:如何优化效率

1楼
北狐 发表于:2025/4/16 11:20:00
 
    For Each dr As DataRow In dt.DataRows
        
        '填充数据
        If DataTables("R03_payable_Detail").sqlFind("customerCode= '" & dr("供应商代码") & "' and kind = '" & dr("类型") & "' and factoryID = '" & dr("工费单号") & "' and ID = '" & dr("系统单号") & "'And number = '" & dr("单内序号") & "' And c And c And c and smartID<>'" & smartID & "'") Is Nothing And DataTables("应付副表本地表").Find("customerCode= '" & dr("供应商代码") & "' and kind = '" & dr("类型") & "' and ID = '" & dr("系统单号") & "'And number = '" & dr("单内序号") & "' And c And c And c ") Is Nothing Then 
            'MessageBox.Show("单据有变动'" & dr("系统单号") & "''" & dr("类型") & "'")
            Dim nr As DataRow = DataTables("应付副表本地表").AddNew()
            For i As Integer = 0 To sCols.Length - 1
                nr(dCols(i)) = dr(sCols(i))
            Next 
        End If
        
    Next
老师,上述代码如何优化速度
2楼
有点蓝 发表于:2025/4/16 11:37:00
dt表和R03_payable_Detail、应付副表本地表,是不是在同一个数据库的,如果不是,没有优化的余地
3楼
北狐 发表于:2025/4/16 11:54:00
dt表和R03_payable_Detail在同个数据库,应付副表本地表是内部数据库的本地表
4楼
有点蓝 发表于:2025/4/16 13:25:00
考虑使用sql关联2个表查询数据:http://www.foxtable.com/webhelp/topics/0688.htm
共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .00781 s, 2 queries.