From: olegmad <ol...@ya...> - 2003-11-13 09:38:44
|
Hi, again! Here my new problem :) ------------------ Database charset: UNICODE_FSS I create table: CREATE TABLE "test" ( "unicode_fss" VARCHAR(128) CHARACTER SET UNICODE_FSS, "win1251" VARCHAR(128) CHARACTER SET WIN1251 ); when i use connection string: "charset=UNICODE_FSS; blablabla..." and try run that code: --- command = new FbCommand("insert into \"test\" (\"unicode_fss\") VALUES ('<russian text>')", connection, transaction); // in VALUE i use russian text command.ExecuteNonQuery(); command = new FbCommand("insert into \"test\" (\"win1251\") VALUES ('<russian text>')", connection, transaction); // in VALUE i use russian text command.ExecuteNonQuery(); And now, when i try fetch data: command = new FbCommand("select * from \"test\"", connection, transaction); FbDataAdapter dataAdapter = new FbDataAdapter(command); DataTable table = new DataTable(); dataAdapter.Fill(table); ----------------- I receive two rows: First row contains:. | <russian text> | DbNull | Second row contains: | DbNull | <russian unreadable text> | ------------------ And now, if i change connection string: "charset=WIN1251; blablabla..." and fetch data again: I receive two rows: First row contains: | <russian unreadable text> | DbNull | Second row contains: | DbNull | <russian text> | ------------------- So, when i insert data in database - all conversion realize correcly, but when i select from base - fb.net provider conversion all text data in charset which i type in connection string. But my fields have diffrent charset. Thanks. |