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 .
Error on Tstringfield on XE4
Re: Error on Tstringfield on XE4
Same problem occurs on XE3 update 2
Re: Error on Tstringfield on XE4
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:
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';
Re: Error on Tstringfield on XE4
Thanks Andrey. It worked!
One consideration : On 4.2.3 version, the driver not put on default params the UseUnicode on list.
Thanks.
One consideration : On 4.2.3 version, the driver not put on default params the UseUnicode on list.
Thanks.
Re: Error on Tstringfield on XE4
Thank you for the information. We added the UseUnicode parameter to the default parameter list.