作为一般规则 - 查询还是VBA? [英] As a generale rule - Query or VBA?
问题描述
我似乎最终得到了大量的追加和更新查询,因为它可以快速轻松地构建查询或根据现有的基础创建新的查询
查询。但我最终会遇到很多长名称的查询:
qryfrmCustomers_Diary_DeleteEntriesBeforeADate
qryfrmMaintenance_CloneOrder_Step1_CreateOrderIDAn dDescription
我是懒惰?我应该编写大部分动作查询来整理数据库窗口中的
杂乱吗?
这是否有一般规则?
谢谢,
Paul
I seem to end up with loads of append and update queries just because it''s
quick and easy to build queries or make a new ones based on an existing
query. But I end up with loads of queries with long names like:
qryfrmCustomers_Diary_DeleteEntriesBeforeADate
qryfrmMaintenance_CloneOrder_Step1_CreateOrderIDAn dDescription
Am I being lazy? Should I code most of my action queries to tidy up the
clutter in the database window?
Is there a general rule for this?
Thanks,
Paul
推荐答案
如果他们是行动查询我不会在其他地方使用,我只是使用
DBEngine(0)(0).Execute" SQL Statement ...",dbFailOnError
if they''re action queries I won''t use elsewhere, I just use
DBEngine(0)(0).Execute "SQL Statement...", dbFailOnError
我认为很大一部分Access人员会做你做的事情,但是如果可能的话,在代码中编写和执行SQL会更好。它减少了b $ b杂乱,但是对于经验较少的人来说,调试问题需要更加困难。
Paul H写道:
I think a good portion of Access people do what you do, however it is
better to write and execute the SQL in code when possible. It reduces
clutter, but it makes it more difficult for lesser-experienced people
to debug issues.
Paul H wrote:
我似乎最终会遇到大量的追加和更新查询,因为它很快就可以快速轻松地构建查询或者根据现有的
查询创建一个新的。但我最终会遇到很多长名称的查询:
qryfrmCustomers_Diary_DeleteEntriesBeforeADate
qryfrmMaintenance_CloneOrder_Step1_CreateOrderIDAn dDescription
我是懒惰?我应该编写大部分动作查询来整理数据库窗口中的
杂乱吗?
这是否有一般规则?
谢谢,
Paul
I seem to end up with loads of append and update queries just because it''s
quick and easy to build queries or make a new ones based on an existing
query. But I end up with loads of queries with long names like:
qryfrmCustomers_Diary_DeleteEntriesBeforeADate
qryfrmMaintenance_CloneOrder_Step1_CreateOrderIDAn dDescription
Am I being lazy? Should I code most of my action queries to tidy up the
clutter in the database window?
Is there a general rule for this?
Thanks,
Paul
准备好的查询比执行SQL更有效动态准备。
问题在于,正如你所说d窗口变得杂乱,我怀疑
大多数有经验的人使用混合方法。
-
Terry Kreft
" Paul H" < no **** @ nospam.comwrote in message
news:G6 ******************** @ eclipse.net.uk ...
Prepared queries are more efficient than executing SQL prepared on the fly.
The problem is that as you say the d window gets cluttered up, I suspect
most people with experience use a mixture of methods.
--
Terry Kreft
"Paul H" <no****@nospam.comwrote in message
news:G6********************@eclipse.net.uk...
我似乎因为
I seem to end up with loads of append and update queries just because
而最终出现了大量的追加和更新查询'
it''s
根据现有的
查询快速轻松地构建查询或创建新查询。但我最终会遇到很多长名称的查询:
qryfrmCustomers_Diary_DeleteEntriesBeforeADate
qryfrmMaintenance_CloneOrder_Step1_CreateOrderIDAn dDescription
我是懒惰?我应该编写大部分动作查询来整理数据库窗口中的
杂乱吗?
这是否有一般规则?
谢谢,
Paul
quick and easy to build queries or make a new ones based on an existing
query. But I end up with loads of queries with long names like:
qryfrmCustomers_Diary_DeleteEntriesBeforeADate
qryfrmMaintenance_CloneOrder_Step1_CreateOrderIDAn dDescription
Am I being lazy? Should I code most of my action queries to tidy up the
clutter in the database window?
Is there a general rule for this?
Thanks,
Paul
这篇关于作为一般规则 - 查询还是VBA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!