Page 1 of 1
Migrating from Borland driver
Posted: Tue 27 Nov 2007 19:16
by esasse
I've just bought your Firebird DBX driver and want to start the
migration of my application.
Do you have any tips, hints, instructions for this migration? What
problems I may have, better practices, things like that?
One thing I want is to use the optimized numeric fields and get rid of
that FMTBCD fields.
Any comments will be appreciated. Thanks.
Posted: Wed 28 Nov 2007 08:53
by Plash
Core Lab driver is compatible with Borland driver. There should be no problems after migration.
But if you enable OptimizedNumerics, you need to recreate fields for datasets in Fields Editor.
Posted: Thu 13 Dec 2007 11:39
by esasse
I will enable OptimizedNumerics, but one thing still not clear for me is if I should EnableBCD also.
I know that Delphi's FMTBCD fields has a lot of bugs, so I'd like to avoid it if possible.
Posted: Fri 14 Dec 2007 12:51
by Plash
Set EnableBCD parameter to False to avoid using BCD fields. In this case no BCD fields are created, and OptimizedNumerics parameter is ignored. OptimizedNumerics is used only if EnableBCD is set to True.
When EnableBCD = True and OptimizedNumerics = False (default), BCD fields are created for all NUMERIC and DECIMAL fields.
When EnableBCD = True and OptimizedNumerics = True, TIntegerField, TFloatField or TFmtBcdField fields are created for NUMERIC and DECIMAL fields, depending on field precision and scale.
For detailed information see 'Type map' topic in ReadMe.html file that is located in the DbxIda installation directory.
Posted: Fri 14 Dec 2007 13:40
by esasse
Yes, but can I live without the BCD fields? Aren't BCD fields required for some type of numbers?
Posted: Mon 17 Dec 2007 14:28
by Plash
We recommend to use the following values for parameters:
EnableBcd=True
OptimizedNumerics=True
In the next build of DbxIda we'll correct field mapping for NUMERIC and BIGINT fields when EnableBcd = False.
In this mode the current DbxIda version maps all BIGINT and NUMERIC fields with Scale = 0 to ftInteger. Precision of TIntegerField is 9. So values with more that 9 digits will be corrupted.
In the next build BIGINT and NUMERIC fields with Precision > 9 will be mapped to ftFloat. Precision of TFloatField is 15-16 digits. That precision is enough for most values.
So with the next build you can set EnableBcd parameter to False.
Posted: Mon 17 Dec 2007 16:57
by esasse
So in the next build the recommended parameters will be:
EnableBcd=False
OptimizedNumerics=doesn't matter
?
Posted: Tue 18 Dec 2007 09:20
by Plash
In the next build DbxIda will work correctly with EnableBcd=False. But it is your choice what mode to use. If you don't want to deal with BCD fields, set EnableBcd to False.