Link to home
Start Free TrialLog in
Avatar of SOTA
SOTAFlag for Canada

asked on

Access97 Pass-through-Query

I wish to use a pass-through-query in Access97 to speed up retrieving a recordset from an SQL server.

I can setup the parameters for the ODBC Connection String by opening up Properties for the pass-through-query in Access97.

Question is, how do I open the pass-through-query and programatically supply the ODBC Connection String needed to connect to the SQL server?

High points for a speedy answer!
ASKER CERTIFIED SOLUTION
Avatar of omgang
omgang
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SOTA

ASKER

Thanks OM Gang.
I have Access97 and the command qdf.RefreshLink is not valid.
Any thoughts?
Thanks!
Try qdf.Refresh
Let me know if it still doesn't work.
OM Gang
Avatar of SOTA

ASKER

There is no QueryDef.Refresh

however,

QueryDefs.Refresh is valid.

:)
Does CurrentDb.QueryDefs.Refresh successfully update the connection string for the pass-through query?
OM Gang
Avatar of SOTA

ASKER

Yes!! That's it!!

Perfect...thanks!!

Cheers,
Russ :)
Avatar of SOTA

ASKER

Awesome!!!!!
I tried it in Access 2007 and it works - the pass-through connection string is updated.
OM Gang
You're welcome.
OM Gang