PC Review


Reply
Thread Tools Rate Thread

DAO QueryDef refresh

 
 
ATD
Guest
Posts: n/a
 
      21st Jan 2010
Hi

I can easily use DAO to update the Connect value for a passthrough QueryDef
object in my database.

However, no matter what I "Refresh" (QueryDefs, TableDefs, Containers, etc),
the new Connect value is not actually used by Access until I reload the
application (not just the database, but the entire application)

Is there a way to force a full refresh?

If I make the change manually, everything works ok - however, I need to be
able to do this in VBA as I need to loop through thousands of external
databases, and changing the setting manually and/or reloading the application
is just not an options

Any thoughts?
 
Reply With Quote
 
 
 
 
Stefan Hoffmann
Guest
Posts: n/a
 
      21st Jan 2010
hi,

On 21.01.2010 13:08, ATD wrote:
> I can easily use DAO to update the Connect value for a passthrough QueryDef
> object in my database.
>
> However, no matter what I "Refresh" (QueryDefs, TableDefs, Containers, etc),
> the new Connect value is not actually used by Access until I reload the
> application (not just the database, but the entire application)
>
> Is there a way to force a full refresh?
>
> If I make the change manually, everything works ok - however, I need to be
> able to do this in VBA as I need to loop through thousands of external
> databases, and changing the setting manually and/or reloading the application
> is just not an options
>
> Any thoughts?

The question is: What kind of refresh or change of the connect string
are you talking about?

Connections or session are cached by Jet. The problem is te way Jet
identifies these sessions.

Consider this scenario: You are using a connection to an Oracle backend
using user name/password authetification. Then you can change the user
name and password combination in the connection and it is stored. But it
will only be used when this connection was not used before with another
user/password combination. Otherwise this existing session will be used.
The only way to "drop" these sessions is to close Access, not only the
current database.


mfG
--> stefan <--
 
Reply With Quote
 
ATD
Guest
Posts: n/a
 
      22nd Jan 2010
Thanks, Stefan

There is no username/password for the connections as they are just thousands
of standalone FoxPro databases in numerous folders across our network.

Surely, there must be some way of getting Access to use the new Connect
setting? I don't particularly want to *manually* change the setting for each
database - that would take years!

"Stefan Hoffmann" wrote:

> hi,
>
> On 21.01.2010 13:08, ATD wrote:
> > I can easily use DAO to update the Connect value for a passthrough QueryDef
> > object in my database.
> >
> > However, no matter what I "Refresh" (QueryDefs, TableDefs, Containers, etc),
> > the new Connect value is not actually used by Access until I reload the
> > application (not just the database, but the entire application)
> >
> > Is there a way to force a full refresh?
> >
> > If I make the change manually, everything works ok - however, I need to be
> > able to do this in VBA as I need to loop through thousands of external
> > databases, and changing the setting manually and/or reloading the application
> > is just not an options
> >
> > Any thoughts?

> The question is: What kind of refresh or change of the connect string
> are you talking about?
>
> Connections or session are cached by Jet. The problem is te way Jet
> identifies these sessions.
>
> Consider this scenario: You are using a connection to an Oracle backend
> using user name/password authetification. Then you can change the user
> name and password combination in the connection and it is stored. But it
> will only be used when this connection was not used before with another
> user/password combination. Otherwise this existing session will be used.
> The only way to "drop" these sessions is to close Access, not only the
> current database.
>
>
> mfG
> --> stefan <--
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with QueryDef Harry Microsoft Access VBA Modules 3 24th Jun 2009 12:29 PM
set DAO.QueryDef to nothing iccsi Microsoft Access Form Coding 6 12th May 2009 10:54 PM
Sum in Querydef Ryan Microsoft Access Queries 10 27th Nov 2008 06:08 PM
Same question, passing params from querydef to querydef. Edwin Knoppert Microsoft ADO .NET 0 8th Dec 2006 08:40 AM
CDO QueryDef? =?Utf-8?B?RGFuRw==?= Microsoft Access Queries 0 3rd Jan 2004 03:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:42 PM.