Page 1 of 1

error with charset in embedded mode

Posted: Wed 30 Apr 2008 10:19
by DarphBobo
Hello.
I'm trying to connect to fb2.03 database (embedded) wia ver 2.10.0.10.
But I get an error:
"CHARACTER SET WIN1251 is not installed"

PS with TADOConnection everything is Ok (the same database, the same client library, etc...)

PPS I tried to clear parameter "CharSet" at TIBCConnection's options page, but an error does not dissapear.

PPPS And even set to "NONE" value - the same error

can you help me?

Posted: Wed 30 Apr 2008 11:10
by DarphBobo
Sory, more detailed info:
this error occures only if I try to execute script from file (insert into ... values ....)
All data in script has win1251 charset

Posted: Mon 05 May 2008 07:21
by Plash
For embedded server the Charset option of TIBCConnection should be empty. You should also check if your script contains
SET NAMES WIN1251
statement. If you will find this statement, remove it.

Posted: Mon 05 May 2008 07:29
by DarphBobo
charset of connection is empty.
script has insert statements only:
insert into mytable (f1,f2) values('one','two');
...

but error does not disspear

Posted: Tue 06 May 2008 07:07
by Plash
We could not reproduce the problem. Please send to ibdac*crlab*com a complete small sample that demonstrates the problem, including the script for creating database objects.

Posted: Tue 06 May 2008 07:46
by DarphBobo
this is my small sample:

procedure TForm1.Button1Click(Sender: TObject);
begin
IBCScript1.ExecuteFile('inserts.sql');
end;

Used scripts:

ddl script executed in IBExpert on FireBird 2.03 (exact my own script):

SET SQL DIALECT 3;
SET NAMES win1251;

create table testtable(
f1 varchar(10) not null primary key,
f2 varchar(10),
f3 varchar(10)
);

dml script "inserts.sql" executed via TIBCScript (exact my own script):

insert into testtable values('one','two','three');
insert into testtable values('two','three','four');
commit;

These are links to screenshots of my TIBCConnection's properties pages:

http://img371.imageshack.us/img371/5923/1pageaa4.jpg
http://img371.imageshack.us/img371/4278/2pagebx7.jpg
http://img242.imageshack.us/img242/4045/3pagejs3.jpg
http://img371.imageshack.us/img371/3711/4pagezk2.jpg

I'm not trying to insert data in national charset now, but still have an error

Posted: Tue 13 May 2008 12:29
by Plash
You should copy firebird.conf file to the directory with your application. In this file you should uncomment and set a value to the RootDirectory parameter. This is the directory where you have placed Firebird embedded server files.
Make sure that the directory with embedded server files has 'intl' subdirectory with the files required for character set support.

See also \doc\README_embedded.txt file in the directory with embedded server files for details.