Migrating from Borland driver

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
esasse
Posts: 47
Joined: Tue 27 Nov 2007 19:08
Location: Brazil

Migrating from Borland driver

Post by esasse » Tue 27 Nov 2007 19:16

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 28 Nov 2007 08:53

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.

esasse
Posts: 47
Joined: Tue 27 Nov 2007 19:08
Location: Brazil

Post by esasse » Thu 13 Dec 2007 11:39

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 14 Dec 2007 12:51

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.

esasse
Posts: 47
Joined: Tue 27 Nov 2007 19:08
Location: Brazil

Post by esasse » Fri 14 Dec 2007 13:40

Yes, but can I live without the BCD fields? Aren't BCD fields required for some type of numbers?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 17 Dec 2007 14:28

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.

esasse
Posts: 47
Joined: Tue 27 Nov 2007 19:08
Location: Brazil

Post by esasse » Mon 17 Dec 2007 16:57

So in the next build the recommended parameters will be:
EnableBcd=False
OptimizedNumerics=doesn't matter

?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 18 Dec 2007 09:20

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.

Post Reply