

With ADO, you can use the Microsoft OLE DB Provider for SQL Server to directly access a SQL Server without the overhead of Microsoft Jet or ODBC. With the Data Access Object (DAO) model, you could use SQL pass-through queries to improve performance when you accessed external data. This removes the overhead of the Microsoft Jet database engine. When you run the query, it sends commands directly to the database server for processing. An SQL pass-through query is made up of an SQL statement and a connection string. You can write a function in Visual Basic for applications that creates an SQL pass-through query. This article shows you how to create an SQL pass-through query in Microsoft Visual Basic for Applications (VBA) with Microsoft ActiveX Data Objects (ADO).


This article applies only to a Microsoft Access database (.accdb and. Moderate: Requires basic macro, coding, and interoperability skills.
