以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 求助高速导入!!! (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=61159) |
-- 作者:heying325 -- 发布时间:2014/12/8 10:20:00 -- 求助高速导入!!! 我给一个导入功能设置了匹配表头的功能。然后写了如下导入代码: For n As Integer = 1 To Sheet.Rows.Count -1 Dim bh As String = sheet(n,0).Text If bh = "" Then Exit For End If Dim rr As DataRow = DataTables("rh_ytoex").SQLFind("运单号码 = \'" & bh & "\'") Dim dr As DataRow If rr Is Nothing Then dr = tb.DataTable.AddNew() End If Dim m As Integer For m = 0 To dh.Count - 1 If Sheet(n,dh(m)).Value = "" Then Continue For Else dr(mc(m)) = Sheet(n,dh(m)).Value End If Next next 问题来了,要导入个几万代码,那时间长的吓人!! 若用了fox提供的高速导入或高速合并,我设置的哪些匹配表头功能就没有了。。请问有什么好办法么?
|
-- 作者:有点甜 -- 发布时间:2014/12/8 10:22:00 -- 不要用SQLFind啊,先加载全部数据,用find比它快n倍 |
-- 作者:Bin -- 发布时间:2014/12/8 10:23:00 -- tables("表名").StopRedraw \'前面加入 tables("表名").ResumeRedraw \'最后加入 应该有一定提升
|
-- 作者:heying325 -- 发布时间:2014/12/8 10:23:00 -- 用其他的程序,如图: fox怎么能做到呢?
|
-- 作者:Bin -- 发布时间:2014/12/8 10:23:00 -- 看3楼 |
-- 作者:有点甜 -- 发布时间:2014/12/8 10:32:00 -- 1、看3楼;
2、导入excel数据的话,可以用vba,把数据一次性取出,再导入,这样的也会很快;
3、http://www.foxtable.com/help/topics/0401.htm
|