Hi,
to get correct data from blob fields, I have to set the CharSet. Doing this, I have to connect first, then disconnect, set the option and then connect again.
Is there another way to do this?
cu Christian
---
const
CHARSET_SQL = 'select VALUE from NLS_DATABASE_PARAMETERS where parameter = ''NLS_CHARACTERSET''';
function ExecLookupString(): String;
begin
// does a query and returns the result of the first record / column as string
// for this, the connection is already opened once
end;
then I do:
UniConnection.ProviderName := 'Oracle';
UniConnection.Server := 'DBSERVER:1521:MyDB';
UniConnection.SpecificOptions.Values['Direct'] := 'True';
UniConnection.SpecificOptions.Values['Charset'] := ExecLookupString(CHARSET_SQL);
UniConnection.Open;
Problem with Oracle Character Sets
-
chkaufmann
- Posts: 82
- Joined: Sat 01 Jul 2006 11:42
Can you be more specific? There is no TOraSession in UniDAC.bork wrote:property TOraSession.Options.UseUnicode = true for saving and loading blob fields in the unicode.
I tried
UniConnection.SpecificOptions.Values['UseUnicode'] := 'True';
instead of setting the 'Charset', but this doesn't work.
cu Christian
Oracle server saves Blob fields as binary data and doesn't have any info about the charset of Blob fields. So if you don't want to depend on server charset then you should convert string to unicode string on write and read data for the Blob fields manually.
But if you want to use server converting string to unicode string and back then you should use Clob fields.
But if you want to use server converting string to unicode string and back then you should use Clob fields.