Page 1 of 1

Type mismatch fo fields string - widestring

Posted: Mon 23 Mar 2015 10:00
by dsonnet
Hi,

I downloaded the trial from your site because I would like to add blob support to my application. I encountered some string mismatch issues when just replacing the driver in my application. I tried to start a brand new project, added a few components (SQLConnection, SQLDataset, provider and clientdataset). If I start the project with no design time created fields no problem, if I add all the fields from the IDE, the string fields are created as string, but then when I start the application I get a crash with the string mismatch error.

Any help appreciated.

Regards

Re: Type mismatch fo fields string - widestring

Posted: Tue 24 Mar 2015 09:10
by ViktorV
If you have persistent fields created with UseUnicode=False, all varchar fields will be mapped to TStringField. If you change UseUnicode to True and don't remove persistent fields, the following error will occur on dataset opening: "Type mismatch for field 'FIELDNAME', expecting: String actual: WideString".
Please make sure that the UseUnicode parameter value in run time is equal its value in design time.