(已解决)关于读取数据库写入二维数组问题,凝问?
本帖最后由 cfs43210 于 2014-5-28 22:56 编辑Dim $cell_handle
Dim $Count = 0
_SQLite_Open($SQLite_Data_Path)
_SQLite_Query(-1, "SELECT * FROM '" & $Theofficial & "' ORDER BY ZJXba DESC;", $hQuery)
While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK
ReDim $cell_handle[$Count + 1]
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
$cell_handle[$Count] = $aRow
GUICtrlCreateListViewItem($cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count] & "|" & $cell_handle[$Count], $main_ListView1)
$Count += 1
WEnd
_SQLite_Close()
不知道代码是否有问题,一万条数据写入二维数组,花时30分钟左右,实在有点受不了.请问有什么高效有方法.谢谢! _GUICtrlListView_AddArray用此函数可以帮你解决! 谢谢!不过我不是所有数据导出,这个用时还好,主要是写入二维数组时间过长。 1w条数据存入数组不可能花费30分钟,不信你把GUICtrlCreateListViewItem注释了再试试 找出原因了.原来是图片写入了数组.写入数组觉得跟数据库内容多少有关.谢谢!
页:
[1]