Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a passthrough query in access using a DSN-less connection?

I'm using DSN-less connections to my SQL Server in an Access database. However, whenever I try to write a "Pass-Through" query and run it, a dialog box pops up asking for the DSN.

like image 844
Brett G Avatar asked May 24 '12 19:05

Brett G


People also ask

What is DSN-less database connection?

DSN-Less ODBC simply means that instead of storing connection information (like server, database, etc.) in a file or the Windows Registry, you have plunked them into a connect string, which is then associated with some data object, like an Access linked table.

What are pass-through queries?

What is a Pass-through Query? A Pass-through query allows you to execute a SQL statement directly against the tables in an external database (such as an Oracle, Sybase, or SQL Server database).


1 Answers

In SQL view, choose properties after you have selected passthrough query and insert an ODBC connect string. For example:

ODBC;DRIVER=SQL Server;SERVER=Server\Instance;Trusted_Connection=Yes;DATABASE=Test

See also: http://www.connectionstrings.com/sql-server-2008

like image 102
Fionnuala Avatar answered Sep 22 '22 21:09

Fionnuala