Hi all,
If I set session property "UseUnicode" to true, all string fields are handled as TWideString, and this allows me to read/write 16 bit characters to db.
The problem is that I can set this property event in a session connected to a non unicode db, potentially generating unclear behaviors when trying to insert non ascii characters.
Is there a way to understand from the program if the database is unicode, and setting consequetly "UseUnicode" session property?
Thank you,
Cheers,
Lorenzo
Automatically setting TOraSession.Options.UseUnicode property
Re: Automatically setting TOraSession.Options.UseUnicode property
Hello,
One of the variants of checking Unicode support on the server can be to check the VALUE field from the V$NLS_PARAMETERS view for presence of UTF data in this field, this can be checked by performing the following query:
and if the query returns not 0, the server is Unicode
One of the variants of checking Unicode support on the server can be to check the VALUE field from the V$NLS_PARAMETERS view for presence of UTF data in this field, this can be checked by performing the following query:
Code: Select all
SELECT count(*) FROM V$NLS_PARAMETERS
WHERE PARAMETER = 'NLS_CHARACTERSET'
AND VALUE LIKE '%UTF%'
Re: Automatically setting TOraSession.Options.UseUnicode property
Thank you for your reply!
Lorenzo
Lorenzo