error with charset in embedded mode

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
DarphBobo
Posts: 4
Joined: Wed 30 Apr 2008 10:11

error with charset in embedded mode

Post by DarphBobo » Wed 30 Apr 2008 10:19

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?

DarphBobo
Posts: 4
Joined: Wed 30 Apr 2008 10:11

Post by DarphBobo » Wed 30 Apr 2008 11:10

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 05 May 2008 07:21

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.

DarphBobo
Posts: 4
Joined: Wed 30 Apr 2008 10:11

Post by DarphBobo » Mon 05 May 2008 07:29

charset of connection is empty.
script has insert statements only:
insert into mytable (f1,f2) values('one','two');
...

but error does not disspear

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 06 May 2008 07:07

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.

DarphBobo
Posts: 4
Joined: Wed 30 Apr 2008 10:11

Post by DarphBobo » Tue 06 May 2008 07:46

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 13 May 2008 12:29

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.

Post Reply