Field type problem with new 6.8.15

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Lithium™
Posts: 42
Joined: Wed 23 Jun 2010 06:42

Field type problem with new 6.8.15

Post by Lithium™ » Tue 24 Sep 2013 06:06

Hello!

I've got a table with field type "real". Previous version (6.2.7) recognized this sql type as TFloatField. Last version (6.8.15) recognizes it as TSingleField. So, type mismatch error occurs when TMSQuery tries to open. It is expensive to correct all projects, moreover somewhere TFloatField is required type.
Could you tell me please as soon as possible is it normal behavior? And what should I do to avoid this problem?

AndreyZ

Re: Field type problem with new 6.8.15

Post by AndreyZ » Wed 25 Sep 2013 07:31

Hello,

In the SDAC version 6.2.7 we added the new functionality - Data Type Mapping, that allows mapping of server data types to IDE types. To fully support data mapping, we made several changes in field creation that also slightly increase performance. In SDAC 6.2.7 and higher, for the SQL Server type REAL the TSingleField field is created. To return the old behaviour, you should add the following mapping rule:

Code: Select all

MSConnection.DataTypeMap.AddDBTypeRule(msReal, ftFloat);
After this, for the SQL Server type REAL the TFloatField field will be created. Please note that to use the msReal variable, you should add the MSDataTypeMap unit to the USES clause of your unit.

Lithium™
Posts: 42
Joined: Wed 23 Jun 2010 06:42

Re: Field type problem with new 6.8.15

Post by Lithium™ » Wed 25 Sep 2013 08:11

Great thanks!

AndreyZ

Re: Field type problem with new 6.8.15

Post by AndreyZ » Wed 25 Sep 2013 08:20

If any other questions come up, please contact us.

Post Reply