VPM Enterprise supports remote data access through remote views and CursorAdapters. Remote views and CursorAdapters allow you to select just the data you need from a remote data source into a local Visual FoxPro cursor. You use a remote view or CursorAdapter to view and update the remote data using a VPM Enterprise form.
In order for a VFP application to use remote views, an ODBC driver must exist for the remote data source. An ODBC driver allows Visual FoxPro to connect to the remote data source and access its data. You can use remote views in VPM Enterprise to create applications that access any ODBC data source – from simple Access databases to complex remote server databases.
Visual FoxPro 8.0 introduced the CursorAdapter class primarily to support remote data connectivity to a wider range of data sources. Prior to VFP 8.0, you could access remote ODBC data sources in a VFP application using remote views. With the CursorAdapter class, you can not only access remote ODBC data sources, but you can also access remote ADO and XML data sources as well as native VFP data. The CursorAdapter class allows you to work with different data source types as native Visual FoxPro cursors. CursorAdapter objects serve as a pipeline that renders data from a data source into a Visual FoxPro cursor.
VPM Enterprise 9.1 introduces extensive support for using CursorAdapters in your applications. VPME now treats CursorAdapters just like tables and views to the extent feasible.
Creating Client-Server Applications with Remote Views and CursorAdapters
The process of creating client-server applications with remote views and CursorAdapters is straightforward. You simply use the Visual FoxPro View Designer to create remote views based on remote data. Or you use the Visual FoxPro CursorAdapter Builder to create CursorAdapters based on remote data.
You set up the remote view, CursorAdapter and field properties in the Data Builder. You create Application Objects based on the remove views and CursorAdapters. That’s it.
A client-server application can use both remote views and CursorAdapters.
The Building Data: Views shows you how to create remote views with VPME.
The Building Data: CursorAdapters shows you how to create CursorAdapters with VPME.
Remote Data Must Exist
Of course, before you can create remote views and CursorAdapters that access remote data, you must have remote data. The remote data may already exist when you begin creating your VPM Enterprise front-end, or you or someone else may have to create it. One of the factors that will influence how you use VPM Enterprise to create a front-end to remote data is whether the remote data already exists.
If the remote data already exists, your job is easier because you won't have to create the remote data or wait for the database administrator to create it. In this case, you can begin creating remote views and CursorAdapters right away.
If you must create the remote data, the next section shows you how you can automate much of the work.