DataSnap.FireDAC DBX Sample
You can find the DataSnap FireDAC dbExpress sample project at:
- Start | Programs | Embarcadero RAD Studio Rio | Samples and then navigate to:
- Subversion Repository:
- You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.
This is a client-server application where the server application is a DataSnap server which provides access to a database, and the client application uses dbExpress to communicate with the server, and FireDAC to shows the contents of two tables from the server application. You can perform modifications on the client application and apply them on the remote database.
How to Use the Sample
- Navigate to the location given above and open
SampleDataSnapFireDAC_DBX_Server.dprojon the Projects Window to make it the active project, and press
F9or choose Run > Run Without Debugging to run the server application.
SampleDataSnapFireDAC_DBX_Client.dprojon the Project Manager to make it the active project, and press
F9or choose Run > Run Without Debugging to run the client application.
- Select Get Tables on the client application to connect to the server application.
The client application shows two tables, a main table that shows a list of clients, and a second table below that shows a list of orders of a client selected in the main table.
In addition to Get Tables, this sample application provides the following buttons:
- Post Updates, to send changes that you perform on the grids to the remote database.
- Cancel Updates, to reset changes that you perform on the grids, returning any modified cells to the value that they have on the remote database.
- Reverse String, which opens a dialog where you can enter a string, send it to the server application, and have the server application reverse the string character by character and return the reversed string.
The client application also provides two checkboxes to configure the communication between the client application and the server application:
- REST determines whether the client application uses a DataSnap REST client (
True) or a regular DataSnao client (
False). For details, see DataSnap REST.
- http determines whether the communication with the server is encrypted using SSL (
True) or not (