DataSnap.FireDAC Sample
This is a sample application that shows how to use DataSnap in combination with FireDAC.
Location
You can find the DataSnap FireDAC sample project at:
- Start | Programs | Embarcadero RAD Studio Alexandria | Samples and then navigate to:
Object Pascal\DataSnap\FireDAC
- Subversion Repository:
- You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.
Description
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 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_ProjectGroup.groupproj
. - Double-click
SampleDataSnapFireDAC_Server.dproj
on the Projects Window to make it the active project, and pressSHIFT
+CTRL
+F9
or choose Run > Run Without Debugging to run the server application. - Double-click
SampleDataSnapFireDAC_Client.dproj
on the Project Manager to make it the active project, and pressSHIFT
+CTRL
+F9
or 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.