March 17, 2005 at 3:55 am
Hello everyone.
New to this so apologies if my question is a bit vague.
Recently upsized MS Access db to SQL server. The orginal Access database runs a query within access that is very slow. I have managed to create the query (with some help ) as an SQL Specific pass through query.
When running this query it is a lot faster. However when I run this query it comes up with the Select Data source box.
Is there any way to specify this in the query it self as I don't want to have to specify which DSN to use when the query is run by the users?
Hope this makes sense.
March 17, 2005 at 6:09 am
Couple of different approaches.
1. On Startup you fire a VBA module that creates the DSN connection with the name and all other information it needs for your purpose on the PC being run from. Even though #1 NOT my #1 choice.
2. Create a VBA module that has the ADODB connection information hard-coded that would get called from the form button onclick event. This way you don't have to worry about anything. DRAWBACKs .. Hardcoded BUT if you use trusted-connections then no worries.... #1 choice
Also #2 would call a stored-procedure that would return your recordset....
Good Hunting!
AJ Ahrens
webmaster@kritter.net
March 18, 2005 at 7:28 am
Yes there is. Go into the SQL view of your pass-through, click View ~ Properties and observe the "ODBC Connect Str" property. Click the builder (three dots) at the right, and select your DSN from there.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply