Share this Page URL

Chapter 20. Client/Server Techniques > Connecting to a Database Server - Pg. 555

Client/Server Techniques 555 Connecting to a Database Server After you define a data source, you are ready to connect to it. You can use these methods to access server data: · · · · · Link to tables residing on the server. Link to views residing on the server. Use pass-through queries to send SQL statements directly to the server. Use VBA code to open the server tables directly. Use ODBCDirect to open and manipulate the server tables. Working with Linked Tables The easiest method of accessing data on the server is to link to the external tables. These linked tables act almost exactly like native Access tables. When you link to remote tables, Access analyzes the fields and indexes contained in the tables so that it can achieve optimal performance. It is im- portant to relink the tables if the structures of the remote tables change. This section discusses how you can link to remote tables through the user interface and by using code. Linking to External Tables via the User Interface To link to a remote table through the user interface, right-click on the Tables tab of the Database window, and then select Link Tables. From the Files of Type drop-down list, select ODBC Databa- ses. The Select Data Source dialog box shown in Figure 20.11 appears. This dialog box has two tabs: File Data Source and Machine Data Source. You use the File Data Source tab to select from