Changing the Connect string for QueryDef passthrough queries

A

ATD

If I use DAO to update the Connect setting for a QueryDef for a SQL
Passthrough query, what do I need to do to ensure that the new connect string
is used and available in the code that follows?

Currently, the only way that I can get this change to "stick" is to either
manually change the setting or close/re-open Access. As I have thousands of
external databases to attach to (the same tasks are performed on each of
these), neither of these is an option. If I use QueryDefs.Refresh or
something similar, it doesn't seem to make any difference - the change is not
in effect (even though, looking at the properties of the query, the change is
there)

Any suggestions?
 
A

ATD

ATD said:
If I use DAO to update the Connect setting for a QueryDef for a SQL
Passthrough query, what do I need to do to ensure that the new connect string
is used and available in the code that follows?

Currently, the only way that I can get this change to "stick" is to either
manually change the setting or close/re-open Access. As I have thousands of
external databases to attach to (the same tasks are performed on each of
these), neither of these is an option. If I use QueryDefs.Refresh or
something similar, it doesn't seem to make any difference - the change is not
in effect (even though, looking at the properties of the query, the change is
there)

Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top