Error on Tstringfield on XE4

Error on Tstringfield on XE4

Postby 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: 29
Joined: Wed 02 Jan 2013 23:53

Re: Error on Tstringfield on XE4

Postby maubuso » Fri 24 May 2013 03:21

Same problem occurs on XE3 update 2
maubuso
 
Posts: 29
Joined: Wed 02 Jan 2013 23:53

Re: Error on Tstringfield on XE4

Postby 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';
AndreyZ
 

Re: Error on Tstringfield on XE4

Postby 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.
maubuso
 
Posts: 29
Joined: Wed 02 Jan 2013 23:53

Re: Error on Tstringfield on XE4

Postby AndreyZ » Mon 27 May 2013 07:24

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


Return to dbExpress driver for InterBase & Firebird