//====================================================================
// 函數: wf_insertrow()
//--------------------------------------------------------------------
// 描述: 在adw的尾部快速插入rows行(可以瞬間插入幾十萬條記錄)
//--------------------------------------------------------------------
// 參數:
// value datawindow adw
// value long rows
//--------------------------------------------------------------------
// 返回: long
//--------------------------------------------------------------------
// 作者: 日期: 2011.04.11
//====================================================================
long ll_rows, row_start, rowcount_now
adw.setredraw(false)
row_start = adw.insertrow(0)
ll_rows ++ //已經插入一行了
do while true
rowcount_now = adw.RowCount()
adw.RowsCopy(row_start, min(rowcount_now - row_start, rows - ll_rows - 1) + row_start, Primary!, adw, rowcount_now + 1, Primary!)
ll_rows += min(rowcount_now - row_start, rows - ll_rows - 1) + 1
if ll_rows >= rows then exit
loop
adw.setredraw(true)
return 1
摘自 yyoinge的專欄