Limitation on Widestring Fields
Milan Vydareny
Chicago, IL, USA
I have a widestring field that originates in a TDataset. The length is designated as 8192. The contents of this field always appears as "Null" in the FastCube grids. However, if I change the length to 8191, the contents do appear.
Since the maximum number of bytes that widestring can occupy is Length * 4 this suggests that there is either a limitation on widestring fields or a bug in FastCube. 4 * 8192 = 32,768. 4 * 8191 = 32,764. Since 32,768 exceeds the maximum integer value of a short integer field, this suggests either a limitation or a bug.
Can anyone clarify this? Is there a limitation or is this a bug?
Thx,
Milan
PS The workaround in my case was to define a calculated field in the TDataset that has a length of 8191 and then use the OnCalc event to substring copy 8191 characters from the input field to the calculated field. I doubt if I'll ever lose a character!
Since the maximum number of bytes that widestring can occupy is Length * 4 this suggests that there is either a limitation on widestring fields or a bug in FastCube. 4 * 8192 = 32,768. 4 * 8191 = 32,764. Since 32,768 exceeds the maximum integer value of a short integer field, this suggests either a limitation or a bug.
Can anyone clarify this? Is there a limitation or is this a bug?
Thx,
Milan
PS The workaround in my case was to define a calculated field in the TDataset that has a length of 8191 and then use the OnCalc event to substring copy 8191 characters from the input field to the calculated field. I doubt if I'll ever lose a character!