From: olegmad <ol...@ya...> - 2003-11-12 16:54:13
|
Hello, Carlos! I use such tools as IB Expert (www.ibexpert.com), IB Console and etc. to input data to database. When i post data (text in russian) to database and try fetch that data with fb.net provider - all russian text disappeares (f.e. for text "bebebe <rusian text> tetete" fb.net provider returns "bebebe tetete"). When i post and retrieve data with fb.net provider - it's ok, BUT I can't read this text with IB Expert (IB Console and other tools). May be fb.net provider works wrong with charsets? ---------------- I create database with charset: UNICODE_FSS ---------------- CREATE TABLE "test" ( "unicode_fss" VARCHAR(128), "description" VARCHAR(128) ); ---------------- using System; using System.Data; using FirebirdSql.Data.Firebird; namespace ConsoleApplication { class MainClass { static private readonly string ConnectionString = @"Charset=UNICODE_FSS;Server=80.80.104.12;Database=c:\temp\carlos.gdb;Connec tion Lifetime=15;Dialect=3;User=carlos;Password=carlos;"; static void Main(string[] args) { using (FbConnection connection = new FbConnection(ConnectionString)) { connection.Open(); FbCommand command = new FbCommand("select * from \"test\"", connection); FbDataAdapter dataAdapter = new FbDataAdapter(command); DataTable table = new DataTable(); dataAdapter.Fill(table); foreach (DataRow dataRow in table.Rows) { Console.WriteLine("Text: {0};\t\tDescription: {1}", dataRow[0], dataRow[1]); } } } } } -------------- I add 3 rows to table: 1. I used ib expert 2. I used fb.net provider 3. I used ib console I used for this command: INSERT INTO "test" ("unicode_fss") VALUES ('!!! <russian text> !!!') |