Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: ADS BCD fieldtypes and FireDAC/Advantage TDataSet


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


Permlink Replies: 2 - Last Post: Mar 26, 2015 5:00 AM Last Post By: Frank Staal
Frank Staal

Posts: 115
Registered: 12/9/99
ADS BCD fieldtypes and FireDAC/Advantage TDataSet  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 24, 2015 8:32 AM
We're in the process of moving our database engine from Advantage TDataSet extensions to FireDAC (XE7), but we need to be backward compatible with XE3 for the foreseeable future. This means the .dfms should be the same so FireDAC and Advantage create the same TXXXXXField types. And that is where the problem lies...

The database is in .dbf files and FireDAC and Advantage treat the NUMERIC fieldtype differently. Physically NUMERIC is stored as a BCD and that is what FireDAC tells me they are. Advantage on the other hand tries to be smart and checks on the decimals and size what to return. Basically it is:

  Result := TFloatField;
  if Decimals = 0 and Size <= 5 then
    Result := TSmallintField;


Is there a way to have FireDAC make the same distinction?

Thanks.
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: ADS BCD fieldtypes and FireDAC/Advantage TDataSet  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 24, 2015 12:34 PM   in response to: Frank Staal in response to: Frank Staal
http://docwiki.embarcadero.com/RADStudio/XE7/en/Data_Type_Mapping_(FireDAC)

--
With best regards,
Dmitry Arefiev / FireDAC Architect
Frank Staal

Posts: 115
Registered: 12/9/99
Re: ADS BCD fieldtypes and FireDAC/Advantage TDataSet  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 26, 2015 5:00 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
http://docwiki.embarcadero.com/RADStudio/XE7/en/Data_Type_Mapping_(FireDAC)

--
With best regards,
Dmitry Arefiev / FireDAC Architect

Thanks, with that and some debugging to find the precise parameters I got it working.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02