Chapter 14. Working with SQL Server Data
Microsoft has always made it easy to connect to SQL Server data from Access by allowing you to create linked tables using Open Database Connectivity (ODBC). You have also been able to create pass-through queries in Access that use ODBC to send commands to SQL Server for processing.
In Access 2000, Microsoft introduced a new way of using Access to work with SQL Server. Instead of creating regular MDB databases and using ODBC, you could create a new kind of application called an Access Data Project (ADP). ADPs don’t use the Jet database engine and ODBC; instead, they use an OLE DB connection to a SQL Server database. In ADPs, you have the ability to view and modify SQL Server objects, and you can create forms, reports, and data access pages based on your SQL Server data.
In this chapter, we present a range of tips for using both traditional MDBs and the new ADPs to create Access applications that read and manipulate data stored in a SQL Server database.
Dynamically Link SQL Server Tables at Runtime
Problem
Your Access SQL Server database uses linked tables and views in SQL Server. You have set up security and permissions in SQL Server and want to make sure that each user’s linked tables are attached under their own permissions, not another user’s permissions. In addition, you don’t want the users to be prompted for an additional login ID and password each time they use a table.
Solution
If you link SQL Server tables from an Access ...
Get Access Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.