过滤开放记录集? [英] Filtering An Open Recordset?

查看:65
本文介绍了过滤开放记录集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有一个RecordSet:


-------------------------- ---------------------------------

设置myRS = CurrentDB.OpenRecordset(SomeSQL, dbOpenDynaset)

---------------------------------------- -------------------


有没有办法动态过滤/不过滤/重新过滤那个RS而没有

做任何.Opens或.Closes?

-

PeteCresswell

Say I''ve got a RecordSet:

-----------------------------------------------------------
Set myRS = CurrentDB.OpenRecordset(SomeSQL, dbOpenDynaset)
-----------------------------------------------------------

Is there any way to dynamically filter/unfilter/re-filter that RS without
doing any .Opens or .Closes?
--
PeteCresswell

推荐答案

Per(Pete Cresswell):
Per (Pete Cresswell):
RS




Access 2003 ... / JET 4.0 ... / ADO 2.8。 ..


使用JET。也许有ADO RS的东西?


这是关于应用程序膨胀问题我一直在抱怨

在其他几个线程中。我会花一些钱在批量工作中与成千上万的RS Opens / Closes相关联




来想想它,也许我应该尝试按照ADO的方式提供我的SQL

....

-

PeteCresswell



Access 2003.../JET 4.0.../ADO 2.8...

Been using JET. Maybe something with an ADO RS?

This is in regards to the app bloat problem I''ve been whining
about in a couple other threads. I''d put some money on it being
associated with tens of thousands of RS Opens/Closes in a batch job.

Come to think of it, maybe I should try feeding my SQL
just the way it is to ADO....
--
PeteCresswell


Per(Pete Cresswell):
Per (Pete Cresswell):
有没有办法动态过滤/不过滤/重新过滤那个RS而没有做任何事情。打开或.Closes?
Is there any way to dynamically filter/unfilter/re-filter that RS without
doing any .Opens or .Closes?




我想我得到了答案,答案是是......


------------------------------------------------ ----------------------------

with myRS

.Filter = adFilterNone

.Filter =" ReturnDate BETWEEN#01/01/1997#AND#01/01/2003#AND FundID = 24835"

结束

----------------------------------------------- -----------------------------


听起来像另一个潜在的速度提升...... ..


-

PeteCresswell



I think I''ve got an answer and the answer is "Yes"....

----------------------------------------------------------------------------
With myRS
.Filter = adFilterNone
.Filter = "ReturnDate BETWEEN #01/01/1997# AND #01/01/2003# AND FundID=24835"
End With
----------------------------------------------------------------------------

Sounds like another potential speed increase too....

--
PeteCresswell


Per(Pete Cresswell):
Per (Pete Cresswell):
我认为我有一个答案,答案是是....
I think I''ve got an answer and the answer is "Yes"....




Nope ....结果表明.Filter只适用于下一次sombody从.Filtered RS打开一个

RecordSet ....所以我们每次都要打开一个新的RS

我们想要一个不同的数据子集。 />
-

PeteCresswell



Nope.... turns out the .Filter only applies the next time sombody opens a
RecordSet from the .Filtered RS.... so we still have to open a new RS each time
we want a different subset of data.
--
PeteCresswell


这篇关于过滤开放记录集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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