Hello,
I have an application that we migrate to D2009, we use mysql and we converted the database to use UTF8 to have full unicode support.
However, for all our quires and virtual tables that they have persistent fields of type string we got this error:
Type mismatch for field 'MyField', expecting: String actual: WideString.
Shouldn't be string stay as string for D2009? migrating string type to wide string will slow down the performance of the application, so it seems it's a bug !!!
You can check that simple by make a connection (don't set the unicode property to true) then drop a query, double click on it , then right click and choose add all fields
Now convert the Unicode property of connection to true, now when u try to open the connection you got that error.
Unidac Forcing to use WideString in D2009 instead of string
TStringField and TWideStringField use memory buffer to store data. The fields do not store data in String or WideString variables. So performance is the same.
TStringField stores data in a buffer in Ansi encoding. TWideStringField stores data in Unicode encoding. You need to use TWideStringField for working with Unicode data.
TStringField stores data in a buffer in Ansi encoding. TWideStringField stores data in Unicode encoding. You need to use TWideStringField for working with Unicode data.
Plash wrote:
..TStringField and TWideStringField use memory buffer to store data.
The fields do not store data in String or WideString variables.
So performance is the same.
TStringField stores data in a buffer in Ansi encoding.
TWideStringField stores data in Unicode encoding.
You need to use TWideStringField for working with Unicode data.a...
Ok, connecting to unicode prepared Firebird or MySQL-DB's causes creation of TWideStringField typed persistent fields. But when i connect to a Sql Server 2005 DB TStringField-Instances are created for char / varchar DB-Fields and multilanguage datatransfer works too. Does Unidac create a specialized descendant of TStringField for string data exchange with SQL Server 2005 tables ?. For me who has to implement support for the DBMS Firebird, MySQL and SQL Server (2005) in my project it seemed to be more effectively to create two different programs (Firebird and MySQL are handled in the same manner) than to compensate the differences in TStringField-Handling in one application.
..TStringField and TWideStringField use memory buffer to store data.
The fields do not store data in String or WideString variables.
So performance is the same.
TStringField stores data in a buffer in Ansi encoding.
TWideStringField stores data in Unicode encoding.
You need to use TWideStringField for working with Unicode data.a...
Ok, connecting to unicode prepared Firebird or MySQL-DB's causes creation of TWideStringField typed persistent fields. But when i connect to a Sql Server 2005 DB TStringField-Instances are created for char / varchar DB-Fields and multilanguage datatransfer works too. Does Unidac create a specialized descendant of TStringField for string data exchange with SQL Server 2005 tables ?. For me who has to implement support for the DBMS Firebird, MySQL and SQL Server (2005) in my project it seemed to be more effectively to create two different programs (Firebird and MySQL are handled in the same manner) than to compensate the differences in TStringField-Handling in one application.