Unicode Migration

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ssette
Posts: 9
Joined: Wed 10 Sep 2014 16:07

Unicode Migration

Post by ssette » Tue 26 Sep 2017 08:09

We have converted a database to unicode and we need to migrate all our delphi applications.
All datasets have persistent TStringField and this seems to be a big problem because fields in unicode should be TWideStringField. Is there a workaround to avoid to modify all string fields ?

TIA

Sergio Sette

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Unicode Migration

Post by MaximG » Wed 27 Sep 2017 08:06

ODAC components don't have a tool for converting persistent fields from one type to another. Try to make necessary changes directly in .DFM files of your project.

ssette
Posts: 9
Joined: Wed 10 Sep 2014 16:07

Re: Unicode Migration

Post by ssette » Thu 28 Sep 2017 10:31

Ok, if we can just replace TStringField with TWideStringField in dfm the migration will be not so hard as expected.

Another related question: we noted that using TWideStringField and UseUnicode = True with NON Unicode databases (in our case ITALIAN_ITALY.WE8MSWIN1252) all works as expected (or at least with Italian and German charachters like à, è, â). Can you confirm this ? And, if yes, why not using always TWideStringFiels ?

Best regards

Sergio Sette

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Unicode Migration

Post by MaximG » Fri 29 Sep 2017 14:08

You can use TWideStringField when working both with Unicode and NON Unicode databases.
Note that when using the property UseUnicode = True, TWideStringField will be automatically created, it is a universal solution

Post Reply