View Full Version : Pass-Through Query


tobybremner
01-20-2010, 12:28 AM
Hi I wonder if someone could help me?

I have created linked tables in Access from our SQL database and I have created a pass through query using these tables.


When I query the data the "Select Data Source" window appears and I have to manually select the .dsn name to return the results.

Is there a way I can incorporate a piece of code at the beginning of the T-SQL to bypass this step so it knows what data source to chose?
Thanks in advance
Toby

namliam
01-20-2010, 01:01 AM
You can right click the title bar of your pass-through then select properties.

In these properties set the dsn and what not, then the popup dont come no more.

tobybremner
01-20-2010, 01:12 AM
Thanks for the response, but Im not too sure what you mean by "set the dsn", I have tried to put the name of the dsn in the description box, which didn't work.
Please could you give me an example of what I should be putting in this box?

Thanks agnain

namliam
01-20-2010, 01:28 AM
Try using the "ODBC Connect str" if you cannot figure that out try reading the help on the subject...

Sample from the help:
ODBC;DSN=Human Resources;SERVER=HRSRVR;UID=Smith;PWD=Sesame;

Or you can use the "..." button to build the connection via a wizard

tobybremner
01-20-2010, 04:16 AM
Many Thanks---managed to get it working.:)