X-DBData is a VCL and FMX nonvisual component package that helps users bridge between Delphi’s data-aware and non-data-aware components.
There are two paradigms within the Delphi IDE.
|Feature||Non-Data-Aware Edit Components||Data-Aware Edit Components|
|Data Manipulation||Manual – using .Text, .Caption, .Value properties||Automatic field-linking via Field and DataSource properties|
|Data Refresh||Manual – data has to be updated via code||Automatic update via Dataset Paradigm|
|Data Type||Manual – certain data-types conversion |
(e.g., using TEdit to load and save Date type)
|Automatic – Data-type is preserved if the correct Data-Aware TEdit is used.|
(e.g., using Data-Aware version of TDatePicker)
|Advantages||Allows complete control of the UI via coding.||Development time significantly reduced.|
Viable low-code solution.
Exponentially reduce the amount of code required for database-transaction processing
|Disadvantages||Inability to use TDBGrid.|
Tedious and time-consuming to code UI to link UI
|Require data source (e.g., database) to have TDataSet components available.|
Non-Database Business Solutions
X-DBData solves niche problems where your Delphi application is required to process large amounts of data.
- Processing instrumentation data (vehicle license plate detection logging)
- Input from nonconventional data sources (bank statements, OFX) and using non-Delphi databases (QuickBooks, Xero)
- Tamper-proof data-storage for which ease of data recovery is required (point-of-sale systems, portable health devices)
Using data-aware database components can dramatically reduce the amount of code for database-transaction processing.
X-DBData allows Delphi objects, such as TList, TObjectList, and generics to be used as a TDataSet replacement, without requiring a primary key.
Delphi generics can encapsulate certain kinds of data for which it is difficult to force a primary key, such as hierarchical data (files and folder), time-series data (stocks), and web-based state machine data (Vue, react states).
In the below-mentioned video, you can see it takes less than a minute to install X-DBData.
Step 1. Select Tools > GetIt Package Manager, as seen below
Step 2. When the GetIt Package Manager Window appears (shown below).
1. type in “x-dbdata”.
2. Click on the Install Button.
Step 3. After installation, go to the Component Palette. Scroll to the bottom, where you should see OnGuard, with all the registered components.
1. Palette with X-DBData components.
QIF Editor Recipe
In this below example, I use X-DBData to quickly read Quicken Interchange Format (QIF), exported from a bank website, or from QuickBooks On-Line.
A sample custom data-aware integration would take ~5 minutes to integrate.
The QIF data structure takes a list of QIF transaction data and, using X-DBData, changes it from a list of QIF data.
TTransaction = class(TObject)
property EntryDate: TDateTime read fdate write fdate;
property EntryDebit: currency read fdebit write fdebit;
property EntryCredit: currency read fcredit write fcredit;
property EntryType: string read ftype write ftype;
property EntryTrans: string read ftransaction write ftransaction;
property EntryComment: string read fcomment write fcomment;
TTransactionList = class(TObjectList<TTransaction>)
The QIF editor allows a user to edit transactions, create or delete transactions, load from CSV (Excel), and export to CSV (Excel).
The QIF data is loaded into TTransactionList and into TXDBData:
procedure TFrmQIFEditor.dbListInsertRecord(DataSet: TDataSet; Index: Integer);
procedure TFrmQIFEditor.dbListDeleteRecord(DataSet: TDataSet; Index: Integer);
Note: I used the full version of X-DBData while developing QIF editor. I have shipped several products (with full-source code) using X-DBData.
The source-code of QIF editor is found at https://github.com/PolywickStudio/X-DBDataRecipe