Page 1 of 1

TStringField instead of TWideStringField

Posted: Tue 21 Aug 2012 18:26
by jaska45
I have a SQLite database. All SQLite databases store string as Unicode (UTF-8 or UTF-16). If I uses the database by using TUniTable all string fields are TStringField instead of TWideStringFields. The text fields should be TWideStringFields so that I read and write the field value as Unicode.

Is this a bug in UniDac? I am using the newest UniDac with Delphi XE2.

Best regards,
Jaska

Re: TStringField instead of TWideStringField

Posted: Wed 22 Aug 2012 03:22
by jaska45
I solved this. You need to set UseUnicode to true

Connection.SpecificOptions.Values['UseUnicode'] := 'True';

Why is this needed? SQLite stores only Unicode text and Unicode support should be turned on by default?

Another question. I used other databases too. Should I set UseUnicode option True when working on any database?

Jaska

Re: TStringField instead of TWideStringField

Posted: Wed 22 Aug 2012 14:31
by AlexP
hello,

The default value of UseUnicode is False for all DAC products and for UniDAC specifically, and we cannot change the value of this option, since this will be changing of the behaviour, and projects created on previous versions won't work or will work incorrectly when updating our products.
If you need to use TWideString fields in any of DBs, you should set this parameter to True.