Error on Tstringfield on XE4

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
maubuso
Posts: 30
Joined: Wed 02 Jan 2013 23:53

Error on Tstringfield on XE4

Post by maubuso » Fri 24 May 2013 03:17

Hi.

I'm having a problem with TStringField on XE4.

In a varchar(20) field, when I run the program, I receive this error :

Project ListaMoradores.exe raised exception class EDatabaseError with message 'dtsMoradores: Type mismatch for field 'LABEL', expecting: String actual: WideString'.

If I run with XE4 Firebird driver, the error not occurs .

maubuso
Posts: 30
Joined: Wed 02 Jan 2013 23:53

Re: Error on Tstringfield on XE4

Post by maubuso » Fri 24 May 2013 03:21

Same problem occurs on XE3 update 2

AndreyZ

Re: Error on Tstringfield on XE4

Post by AndreyZ » Fri 24 May 2013 06:37

Hello,

To solve the problem, you should set the UseUnicode parameter of TSQLConnection to False. You can set it in design-time, or in run-time using the following code:

Code: Select all

SQLConnection.Params.Values['UseUnicode'] := 'False';

maubuso
Posts: 30
Joined: Wed 02 Jan 2013 23:53

Re: Error on Tstringfield on XE4

Post by maubuso » Fri 24 May 2013 14:47

Thanks Andrey. It worked!

One consideration : On 4.2.3 version, the driver not put on default params the UseUnicode on list.

Thanks.

AndreyZ

Re: Error on Tstringfield on XE4

Post by AndreyZ » Mon 27 May 2013 07:24

Thank you for the information. We added the UseUnicode parameter to the default parameter list.

Post Reply