Hello,
I have upgraded the 4.70 driver to the last 6.3.6 and I encounter the following problem :
a select from a column declared as CHAR(4 CHAR) with nls_length_semantics = 'CHAR' returns the value 'DATA ' (16 characters) whereas the the driver 4.70 correctly returns the value 'DATA' (4 characters as expected).
Both environnements are exactly the same, only the dll is replaced.
The character set of the database is AL32UTF8.
Should I make changes to the connection options for the new driver ?
Thanks.
Char length issue
Re: Char length issue
Hello,
If you are using Delphi 2006 or higher, you should set the UseUnicode option to True. Otherwise, set the CharLength option to 1. However, if in the field multi-byte symbols are used, they will be displayed correctly.
If you are using Delphi 2006 or higher, you should set the UseUnicode option to True. Otherwise, set the CharLength option to 1. However, if in the field multi-byte symbols are used, they will be displayed correctly.
Re: Char length issue
Thanks, setting CharLength to 1 solved the problem.
Can you give me more explanations about this parameter because its purpose remains unclear to me: should it reflect the character's length used by the Oracle database or does it tell Oracle of the character's length expected by the driver when returning data ?
Can you give me more explanations about this parameter because its purpose remains unclear to me: should it reflect the character's length used by the Oracle database or does it tell Oracle of the character's length expected by the driver when returning data ?
Re: Char length issue
When working with strings, we allocate a buffer to store them. If the property CharLength = 0 , we calculate the required buffer depending on the parameters returned by the server: if CharLength <> 0 - we allocate the specified number of bytes for a symbol forcedly.