Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
News

New in 12.3: Scripts for Migration from InterBase Express to FireDAC

Today the primary focus for RAD Studio database access is on the FireDAC universal database access library. Given in the past Delphi and C++Builder also included other database engines, and they still include a few alternative options, Embarcadero has been creating scripts and helper units to simplify the migration from other database access libraries to FireDAC.

The ReFind Tool

The tool we use for migration is called ReFind (short for Regular Expression Find and Replace) and it has been available for some time. You can find the documentation of this tool at 

https://docwiki.embarcadero.com/RADStudio/Athens/en/ReFind.exe,_the_Search_and_Replace_Utility_Using_Perl_RegEx_Expressions 

refind docwiki

The tool started by offering migration from AnyDAC (FireDAC predecessor library), followed by migration from BDE, later dbExpress and dbGo (for ADO), and now InterBase Express, the InterBase specific data access library we ship in RAD Studio. 

Each script is a collection of rules to be applied, like the following to replace all “TQuery” with “TFDQuery” in Pas files:

The tool ships with the product, while the migration scripts (which you can customize and adapt to the coding style of the project you want to convert) are available in the demos folder, and also on GitHub at:

https://github.com/Embarcadero/RADStudio12Demos/tree/main/Object%20Pascal/Database/FireDAC/Tool/reFind (see also the image below)

Notice that while the scripts do a lot of conversion work, they are augmented by extra classes, which help address differences in naming and parameters, working as a “facade” between the original API and the new one.

refind github

ReFind for InterBase Express (IBX)

The new feature in 12.3 is a new migration script from InterBase Express to FireDAC. What is InterBase Express (or IBX)? You can read about the library on docwiki at:

https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Getting_Started_with_InterBase_Express 

This is a library that’s still and we plan to keep in the product, but offering a migration path to FireDAC can help you leverage the many sophisticated features FireDAC offers. 

How do you use this migration tool?

  • First, make sure you install IBX, which is an optional feature in the Manage Features dialog box
  • Second, install the special compatibility package available in binFireDACIBXIntegrate290.bpl. This will register TFDIBDatabase and TFDIBDataSet components.
  • Third, use the script files to from the demo folder listed above under reFind and the subfolder IBX2FDMigration
  • Fourth (and repeat a few times), update the script according to output you get and run the migration again.

fire dac logo 3222854

More FireDAC Features in RAD Studio 12.3

This is not the only feature added to FireDAC in the 12.3 release. We also added:

  • Official support for Microsoft SQL Server 2022, including support for MSSQL sequences in FireDAC and for stored procedures with multiple TVP parameters of the same table type
  • Support for Oracle DRCP (Database Resident Connection Pooling)
  • Support to connect to MySQL 8.4
  • FireDAC support for versions from 3.0 to 8.0 of MongoDB (requiring updates to the client DLLs libbson and libmongoc). The FireDAC MongoDB database connection has a new parameter, called UseSRV. It can be used to enable a DNS-constructed list of available servers and it’s  recommended when connecting to MongoDB Atlas.

Notice that a number of these drivers and the related features are available only in the Enterprise and Architect versions of RAD Studio, not in the Professional one.

Happy Database Coding

Database access remains a core, fundamental feature of Delphi, C++Builder and RAD Studio and our focus on continuous improvement to the database RTL and FireDAC remains steady. Combined with our REST and HTTP client library and cloud access features (including the third party AWS SDK for Delphi, available in GetIt to our Enterprise and Architect customers).

See What's New in 12.2 Athens See What's New in 12.3 Athens Dev Days of Summer 2-24

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Marco is one of the RAD Studio Product Managers, focused on Delphi. He's the best selling author of over 20 books on Delphi.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES