Tuesday, September 15, 2009

Creating an AS/400 passthrough query in MS Access

Passthrough queries can be efficient for AS/400 ODBC connections because they let you bypass the JET engine and take advantage of the AS/400's query processor.

To create a passthrough query in Access, open the Queries windows and then double-click the "Create query in design view" icon. Close the New Tables dialog box that automatically appears. Then, on the Query menu, select SQL Specific and then Pass-Through option. Next, set the ODBC connection string by selecting the Properties icon in the toolbar and then clicking on the ellipsis next to the ODBC Connect Str property. You're then prompted to select an existing data source to the AS/400, or you can create a new data source if an AS/400 data source doesn't already exist. After setting the connection properties, type your passthrough query in the SQL Pass-Through Query window and click the Execute icon to run the query

No comments:

Post a Comment