Creating a Pass Through Query

SELECT Customers.4- EßoM Customers WHEKE CLEtDmers.Cim1r|='France

Figure 15-4: A pass-through query used to access external data sources is a special type of query and can only be created via the SQL Pass-Through Query window or in a VBA procedure.

SELECT Customers.4- EßoM Customers WHEKE CLEtDmers.Cim1r|='France

Figure 15-4: A pass-through query used to access external data sources is a special type of query and can only be created via the SQL Pass-Through Query window or in a VBA procedure.

Part II

rrench Customers SOL Pass-Through Quury

- [□[ x|

1 CustomerlD

CompanyName

ContaclName

ContactTitie

Address

► Iblonp

Blondesddsl père et fils

Frëdèrique Cite aux

Marketing Mana ger

24. place Kléber_ 1

BONAP

Bon app1

Laurence Leb ¡h an

Owner

12, rue des Bouchers

DUMON

Du monde entier

Janine Labrune

Owner

67, rue des Cinquante Otages

FOLIG

Folies gourmandes

Martine Rancé

Assistant Sales Agent

184, chaussée de Tournai

FRAWR

France restauration

Carine Schmitt

Marketing Manager

54, rue Royale

LACOR

La corne d'abondance

Daniel Tonini

Sales Representative

67. avenue de l'Europe

LAMA!

La maison d'Asie

Annette Roui et

Sales Manager

1 rue Alsace-Lorraine

PARIS

Paris spécialités

Marie Bertrand

Owner

265, boulevard Charonne

SPECD

Spécialités du monde

Dominique Perner

Marketing Manager

25. rue Lauriston

V1CTE

Victuailles en stock

Mary Saveley

Sales Agent

2, rue du Commerce

VtNET

Vins et alcools Chevalier

Paul Henriot

Accounting Manager

59 rue de l'Abbaye

In™, "fïï ; TT

1 ► 1 M 1™ 1 of il

< j

► |

Figure 15-5: A pass-through query returns only the requested data from the remote data source. The returned data is read-only.

Figure 15-5: A pass-through query returns only the requested data from the remote data source. The returned data is read-only.

Pass-through queries can also be created using VBA procedures. In earlier versions of Microsoft Access, pass-through queries were used with Data Access Objects (DAO) to increase performance when accessing external ODBC data sources. In ADO, you can use the Microsoft OLE DB Provider for SQL Server to directly access the SQL Server. For this reason, you do not need to create pass-through queries. However, since it is possible to create a pass-through query using ADOX and Microsoft Jet Provider, the next hands-on demonstrates how to do this.

0 0

Post a comment