TWordField vs TByteField for TinyInt
TWordField vs TByteField for TinyInt
I have several older apps that most was built with 6.1 or earlier. And I started to see issues when I upgraded to XE8 and 7.1.6. The issue was there were a lot of TWordFields defined that referenced tinyint fields from queries or stored procedures. Instead of returning a 0 or 1, I was getting something like 42685. I found that if I changed them to TByteFields I would again get 0 or 1. Do any types translate to TWordField? Or can I blanket replace all the TWordFields with TByteField? There are over 1000, so individual replacement would be problematic. And when would this have changed?
Re: TWordField vs TByteField for TinyInt
Thank you for the information. We have reproduced the problem and will investigate it.
As a temporary solution to this problem, you can use Data Type Mapping - map the data type TINYINT as ftWord. For example in the dataset:
More detailed information about Data Type Mapping can be found in our online documentation: http://www.devart.com/sdac/docs/index.h ... apping.htm .
Note: to use the msTinyint constant, add the MSDataTypeMap unit in the uses section.
As a temporary solution to this problem, you can use Data Type Mapping - map the data type TINYINT as ftWord. For example in the dataset:
Code: Select all
MSQuery.DataTypeMap.AddDBTypeRule (msTinyint, ftWord);Note: to use the msTinyint constant, add the MSDataTypeMap unit in the uses section.
RAD Studio does not support the ftByte type until version 2009, and therefore SDAC also does not support this type. In SDAC 6.10, the support for this type has been implemented for RAD Studio 2009 and subsequent versions of the studio.GNiessen wrote:And when would this have changed?