TField size problem using select decode

mclot

Member²
In an Oracle dataset I have a TField created by a select decode statement.
While up to Oracle 9.0.1 the size was determined by the longest string of my decode parameters, in Oracle 9.2 it is set up with fixed size depending from the length of the strings in the decode parameters.
I.e., if my longest string was sized 16 bytes, in Oracle 8.1.7 and Oracle 9.0.1 the associated TField size is 16 while in Oracle 9.2 is 32 !!!
You can always manually reduce this size but you always have to remind to check it.

Have you any hint about this different behaviour?
Thanks
 
Do you have the same character set size on 8.1.7/9.0.1 and 9.2? If the field size is 32 instead of 16, I would suspect that the character size has increased.
 
I have set up the "nls_length_semantics" parameter to CHAR and now the "select fld1 as txt"
statement works fine: the TField size is correctly detected. But with the "select decode(...) as txt" statement I still get back the mismatch error.

This error arises since I installed the latest D7 patch. Probably the wrong field size detection in Oracle 9.2 was occurring even before, but Delphi didn't raise an exception.

You said to verify the character size: how can I do? Do you know other Oracle parameters that can affect this behaviour?

Have anyone else found this kind of problem with Oracle 9.2 after applying the latest D7 patch?
Thanks
 
Can you check the character set on both databases? You can use this statement:

select value
from v$nls_parameters
where parameter='NLS_CHARACTERSET'
 
Back
Top