Page 1 of 1

Field type problem with new 6.8.15

Posted: Tue 24 Sep 2013 06:06
by Lithiumâ„¢
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?

Re: Field type problem with new 6.8.15

Posted: Wed 25 Sep 2013 07:31
by AndreyZ
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.

Re: Field type problem with new 6.8.15

Posted: Wed 25 Sep 2013 08:11
by Lithiumâ„¢
Great thanks!

Re: Field type problem with new 6.8.15

Posted: Wed 25 Sep 2013 08:20
by AndreyZ
If any other questions come up, please contact us.