Re: SELECT Queries. A straight answer.
- From: lyle fairfield <lyle.fairfield@xxxxxxxxx>
- Date: Wed, 24 Dec 2008 15:23:46 -0800 (PST)
On Dec 23, 4:47 pm, "David W. Fenton" <XXXuse...@xxxxxxxxxxxxxxxxxxx>
wrote:
I don't like using CurrentDB directly because certain things go out
of scope immediately. The database reference itself doesn't, as it's
just used to open the recordset, but I've had issues with it in
other cases.
Of course, I use a cached database variable wrapped in a function,
rather than repeatedly using CurrentDB.
Perhaps you could try CurrentProject.Connection.Execute. This avoids
things going out of scope (actually CurrentDB creates a new instance
of the current database each time it is called which is why the
properties, objects etc of one CurrentDB are not the properties,
objects of another CurrebtDB, that is [CurrentDB is CurrentDB] must be
always false. It's as if every time we wrote "Lyle Fairfield" another
Lyle Fairfield (not necessarily an exact clone, for if there were
changes in the real Lyle Fairfield during the time of the creations
then we would see different shadows on the wall.)) And of course,
CurrentProject.Connection.Execute is very simple, doesn't have to be
released (closed or set to nothing), and the returned Recordset
provides some capabilities that Jet's Recordset does not. GetString
and Save (to a local text or xml file) are two that come to mind right
away.
.
- References:
- SELECT Queries. A straight answer.
- From: strongsilentone
- Re: SELECT Queries. A straight answer.
- From: Rick Brandt
- Re: SELECT Queries. A straight answer.
- From: strongsilentone
- Re: SELECT Queries. A straight answer.
- From: Rick Brandt
- Re: SELECT Queries. A straight answer.
- From: Tony Toews [MVP]
- Re: SELECT Queries. A straight answer.
- From: Rick Brandt
- Re: SELECT Queries. A straight answer.
- From: Tony Toews [MVP]
- Re: SELECT Queries. A straight answer.
- From: David W. Fenton
- SELECT Queries. A straight answer.
- Prev by Date: Re: Split Database Pros and Cons
- Next by Date: Re: Use DAO or ADO?
- Previous by thread: Re: SELECT Queries. A straight answer.
- Next by thread: Re: SELECT Queries. A straight answer.
- Index(es):
Relevant Pages
|
Loading