FDDFMChanger
Go Up to Utilities (FireDAC)
This topic describes the automatic BDE > FireDAC migration utility.
Note: FDDFMChanger is not currently available in Embarcadero FireDAC v 7.0.1.
General
FireDAC FDDFMChanger is a console application, designed for semi-automatic:
- Conversion of a BDE application into a FireDAC application.
- Migration of a FireDAC application between two FireDAC versions, with incompatible APIs.
The idea behind FDDFMChanger is to replace the names of the BDE components and properties with appropriate FireDAC names.
Note: The FDDFMChanger utility and the BDE2FireDAC.txt files are located in the Bin subfolder of the FireDAC installation folder.
Command-Line Parameters
Run the FDDFMChanger utility without any arguments. It outputs the following reference text:
DFM-Changer 2.3 Copyright (c) 2000-2013 by DA-SOFT Technologies (www.da-soft.com) All Rights Reserved. Use: FDDFMChanger {<filesToProcess>} [-s] [-i] [-a] -f <RuleFile> -s - recurse subdirectories -i - ignore errors -f - path to filter files -a - migrate all occurrences; otherwise, only components are migrated
For example,
FDDFMChanger x:\myDir\*.pas x:\myDir\*.dfm -s -a -f x:\MyRules.txt
changes all PAS and DFM files in myDir, including subdirectories, according x:\MyRules.txt
Using FDDFMChanger
In the command line you indicate where the files to convert are located. The sample below illustrates the migration of all PAS and DFM files in the directory "x:\myDir\":
FDDFMChanger.exe x:\myDir\*.pas x:\myDir\*.dfm [...]
You also have to indicate the location of the rule file. The BDE > FireDAC rule file is located in Bin\BDE2FireDAC.txt:
FDDFMChanger x:\myDir\*.pas x:\myDir\*.dfm -s -a -f BDE2FireDAC.txt
The rule file consists of a few lines, each of them similar to the following:
[old name] -> [new name] -> [add this unit to the interface USES clause]
The "unit" may be a comma-separated list of the units. An example of a translation rule in the rule file is shown below:
[TStoredProc] -> [TADStoredProc] -> [uADCompClient]
This replaces TStoredProc
with TADStoredProc
and adds the uADCompClient
unit to the USES clause.
The completion code
When the utility finishes the conversion successfully, it returns the exit code 0. Otherwise, the exit code is greater than 0.