Encoding or charset problem

Posts   
 
    
shennig
User
Posts: 48
Joined: 14-Nov-2006
# Posted on: 01-Oct-2008 16:48:59   

Hi,

i'm using Gen Pro Version 2.0.0.0 Final (with adapter) for a Firebird 2.0 database (in .Net 3.5 with SP1). i connect embedded to a local database file which has the charset "ISO8859_1". i write an entity in an table, in which one field is an varchar. the text in this field has two special chars „ and “ copied from a ms word file. the field with the special characters is one field of the primary key. the two characters are written correct to the database - when i look in the database with IB Expert with charset "ISO8859_1" the special chars are displayed normally. But when i fetch the row back via FetchEntity(EntityName) the field contains „ instead of „ and “. And the real problem is that if i try to save the entity again there is an SD.LLBLGen.Pro.ORMSupportClasses.ORMConcurrencyException so that i can't save a new value for other fields. why do gen pro do not read the characters correct? the connectionstring is set with "Database=.\res\DB\User.db;Charset=ISO8859_1;ServerType=1".

please help.

best regards,

shenni

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 01-Oct-2008 17:12:38   

The values are just read from the datareader and into the fields, so there's no conversion going on in our code: the string provided by the datareader on the firebird database is placed inside the field.

Could you create a small .NET console app with normal ADO.NET classes, like FbDataReader and FbConnection to create a small datareader on that table with a SQL query to fetch that particular row and with that connection string? Please check if reader.GetValues() in that case produces a string which does contain the right values.

(and please next time post in a forum which is actually monitored. Thanks).

Frans Bouma | Lead developer LLBLGen Pro