I have an Access 2003 application that I would like to create reports for using stored procedures via pass-through queries. Everything works fine with one exception. When I specify the stored procedure to use for the pass-through query I have to choose a DSN to provide the database connection info. I need to be able to change the connection info for the stored procedure used in the pass-through query via code. This is so I can switch to development, production, testing environments from within the application.
Currently all of my data access (additions, updates, edits) uses ADO and I build the connection strings via VBA code. I am unsure how how to change the connection info of the pass-through queries via code. Any thoughts? Thank you.