Improve VFP data retrieval with WCF
Windows Communication Foundation (WCF) enables us to create distributed architecture and use Visual FoxPro (VFP) as a client/server system executing the operation on the server (backend). With the WCF client we can download the data from the server in asynchronous (non blocking) mode. The measurement in this article show us this can be done much faster then downloading the data with VFP functions or oledb data adapters. With WCF, we can take advantage of parallel (asynchronous) operation and distribute the processing of data between the client and the server. The retrieved data can be presented in VFP or Net (Windows) controls. In the download of this article is the code of four projects: WCF service, WCF client, COM object and VFP client. We present the code and the measurement of retrieving the data from the server in the form of a data table, a dataset, a strong typed collection and the dbf file. The fastest is the retrieve and transport of the dbf file binded to the VFP grid, on the second place (24%slower) is the strong typed Net collection binded to the Net grid, the laziest (30% slower) is the Net data table binded to the windows Net grid. Except for very small record set, there is a big time gap (almost 100%) between the direct VFP data retrive over the local network and using the WCF service...