Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Migration Interbase -> Firebird and FireDac


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 4 - Last Post: Nov 3, 2016 4:00 AM Last Post By: Michel BALLASSE
Michel BALLASSE

Posts: 6
Registered: 3/6/12
Migration Interbase -> Firebird and FireDac  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 20, 2016 1:40 AM
Hi
I've actually an application developped with Delphi XE6 and Firedac
This application uses an Interbase 6.5 Database
The connection parameters are loaded at running time with SQLDialect = 1

Many TFDQuery are defined with persitent fields as TIntegerField and TFloatField

I have to migrate to Firebird 2.5
So the Interbase database has migrated to Firebird 2.5 database (which is configured in SQLDialect = 3)

When I try to test my application at running time and/or TFDQuery at design time, I always get an error on the format field not corresponding
TlargeInt instead of TIntegerField
TBCDField instead of TFloatField

I already set on the Connection component options UseExtraMetadata = False and no mappingsRules

Today, the only solution I have found to work is to remove all persistent fields from each TFDQuey and re-create them

Is any way most pratical and centralized to make running my application with a Firebird database ?

By advance thanks.
Regards
Michel
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Migration Interbase -> Firebird and FireDac  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 20, 2016 8:21 AM   in response to: Michel BALLASSE in response to: Michel BALLASSE
You can use FireDAC mapping rules.

--
With best regards,
Dmitry
Michel BALLASSE

Posts: 6
Registered: 3/6/12
Re: Migration Interbase -> Firebird and FireDac  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 20, 2016 8:27 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Hi Dimitry

Thanks for this solution

So I have to add mapping rules like that :
Source : dtSingle / Traget : dtBCD
Source : dtDouble / Target : dtBCD

Is this correct ?

Dmitry Arefiev wrote:
You can use FireDAC mapping rules.

--
With best regards,
Dmitry
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: Migration Interbase -> Firebird and FireDac  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 25, 2016 12:12 AM   in response to: Michel BALLASSE in response to: Michel BALLASSE
TlargeIntField instead of TIntegerField

Source: dtInt64 / Target: dtInt32

TBCDField instead of TFloatField

Source: dtBCD / Target: dtDouble

More about that:
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Data_Type_Mapping_(FireDAC)

--
With best regards,
Dmitry
Michel BALLASSE

Posts: 6
Registered: 3/6/12
Re: Migration Interbase -> Firebird and FireDac  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 3, 2016 4:00 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
TlargeIntField instead of TIntegerField

Source: dtInt64 / Target: dtInt32

TBCDField instead of TFloatField

Source: dtBCD / Target: dtDouble

More about that:
http://docwiki.embarcadero.com/RADStudio/Berlin/en/Data_Type_Mapping_(FireDAC)

--
With best regards,
Dmitry

Hi Dinitry
Thanks for this solution
So I supposed if I use mappings rules, this solution increases the execution time.
Is it not a better solution to replace all AsFloat and AsInteger items in the source code and DFM files with AsBCD and asLargeInt ?
Regards.
Michel
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02