At least I think it should be easy, but I can't find an answer in books or on the web.
The purpose of the query is to create a temporary local Access table using a passthrough to a SQL database. (based on user login).
#1: My application first creates a SQL pass-through, then a make-table query that references the pass-through.
My question is this: Would it make for better performance if I just changed the .SQL in the pass-through (that underlies the make-table query) instead of re-creating both queries each time? I'm thinking that this would keep the query optimization thats already been created. (Or maybe if I change the .SQL it has to re-optimize so no benefit?)
And #2: I can't find any code samples on how to check whether a querydef already exists in the local database (besides trying to delete it and checking for an error). If the answer to question #1 is that I should only re-create the queries when they don't already exist, then how can I check for that?
Many thanks in advance for sharing your knowledge!
Normajean
The purpose of the query is to create a temporary local Access table using a passthrough to a SQL database. (based on user login).
#1: My application first creates a SQL pass-through, then a make-table query that references the pass-through.
My question is this: Would it make for better performance if I just changed the .SQL in the pass-through (that underlies the make-table query) instead of re-creating both queries each time? I'm thinking that this would keep the query optimization thats already been created. (Or maybe if I change the .SQL it has to re-optimize so no benefit?)
And #2: I can't find any code samples on how to check whether a querydef already exists in the local database (besides trying to delete it and checking for an error). If the answer to question #1 is that I should only re-create the queries when they don't already exist, then how can I check for that?
Many thanks in advance for sharing your knowledge!
Normajean