Wednesday, January 4, 2012

Delphi 2010 "expecting: String actual: WideString" on dbExpress for Unicode supportive DB's

When working with dbExpress with Unicode support and bound the fields to the ClientDataset, it create this "expecting: String actual: WideString" error. If you're database is setting up for Unicode, then only you will seen this problem.

If need to Ignore this problem, you need to
   set
    SQLConnection.Params.Values['UseUnicode'] := 'False';
or Open the .dfm file and replace  TStringField with TWideStringField. Remember to rename the field names define in the pas files too. 

No comments:

Post a Comment