MS访问Treeview Control加载缓慢,是否需要使用ADO而不是DAO? [英] MS access Treeview Control slow to load, do I need to use ADO instead of DAO?

查看:45
本文介绍了MS访问Treeview Control加载缓慢,是否需要使用ADO而不是DAO?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个activeX树视图控件,该控件具有4个级别的节点(子节点),每个级别都与存储在数据库后端(内部服务器)中的单独表相关.要使此树形视图起作用,需要3个查询和4个dlookup.

I have an activeX treeview control that has 4 levels of nodes (child nodes), each relating to a separate table which is stored on the backend of the database (in-house server). There are 3 queries and 4 dlookups which were required to make this treeview work.

随着数据库开始变得高度填充,带有树视图控件的表单的加载速度变得很慢(10秒).我想加快加载时间,我认为至少需要考虑转换为ADO.

As the database has started to become highly populated, the form with the treeview control has become slow to load (10 seconds). I would like to speed up this load time, I think converting to ADO is something I need to at least consider.

这是唯一能真正加载其4个表这样的大量数据的表格,我想我可能需要将查询记录集转换为ADO?

This is the only form that really loads such high quantity of data as its 4 tables and I am thinking that I may need to convert the query recordsets to ADO?

我对ADO或其最适用的地方知之甚少,但是当我使用的是activeX控件时,也许最合适?我仅在此表单上使用DAO.recordset,因为可用的各种参考VBA都使用它.

I don't know much about ADO or where its best applied, but as I'm using an activeX control maybe its best suited? I have only used DAO.recordset on this form because the various reference VBA available use it.

  • ADO是否更适合这种情况?

  • Is ADO more appropriate for this scenario?

使用ADO会加快表单的加载时间吗?

Will using ADO speed up the load time of my form?

将VBA中使用的记录集转换为ADO复杂吗?

Is it complicated to convert recordsets used in VBA to ADO?

NB:我不完全确定如何将VBA代码转换为ADO记录集,但是如果不合适,我将不费吹灰之力

NB: I'm not entirely sure how to go about converting my VBA code to ADO recordsets, but if its not appropriate I wont bother learning it

推荐答案

快速加载树形视图的窍门"是双重的

the "trick" for fast loading a treeview is twofold

a)您应该保存/计算级别编号"(0 =地面级别, 1等),以便在 加载,这样您就可以一步完成整个树的加载而无需 递归搜索.我个人总是有一个单独的本地人 treeview-table包含所有内容,尤其是 级别编号

a) You should save / calculate the "Level-Number" (0 = Ground level, 1 etc. ) in beforehand so that you have the level-number handy when loading so that you can load the whole tree in one step without recursive searching. I personally always have a separate local treeview-table which contains all things, especially the level-number

b)在加载到数组中之前先加载表信息,然后从 那里.最好的问候克劳斯

b) Load the table info before loading into an Array and load it from there. best regards Klaus

这篇关于MS访问Treeview Control加载缓慢,是否需要使用ADO而不是DAO?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆