Briefcase Applications Explained
(Page 1 of 4 )
If you have remote users connecting to your database server who need to make changes to the data, you might want to set up a briefcase application, depending on what exactly they do with the data. This article will help you set one up using Delphi, MySQL, and an XML file.
Introduction
So, what is a briefcase application? It is a client program that enables users to connect to a database server to retrieve data, then save it and work on it locally. This allows them to make any changes they want to the data while disconnected from the database server and then apply these changes back to the database server at a later stage.
The obvious advantage of this is that a user can take the data on the road or wherever he or she wants to take it and work on the data without having to be connected to the database server. In this article we are going to implement a briefcase application that will use MySQL as the database server and an XML file to store downloaded data on the local disk.
What you need to create this application:
- Delphi 6 or higher
- Access to a Database Server (MySQL)
How the Application Works
The application will download information from the database server through an ADO dataset and then save the data to an XML file, using the save to file method of the dataset. Then the XML file will be loaded into a dataset for editing, and then the changes will be uploaded to the database server. Below is an outline of the two processes involved:
Download data from database server:
A) Database server (MySQL) --> ADO DataSet --> XML file
Update changes to the database server:
B) XML file --> ADO DataSet --> Database server (MySQL)
The XML file is at the heart of the application. This is where you will store the data that you want to work on offline. The file will automatically inherit the format of the table from which it was downloaded.
Next: The Database Server >>
More Delphi-Kylix Articles
More By Leidago