Subject Re: [firebird-support] TIBDatabase CreateDatabase default character set
Author Rolf & Sibylle Nussbaumer
jojogeyer wrote:
> Hi everybody,
>
> trying to create a database with TIBDatabase. Works fine except for
> the character set. I always get a dynamic SQL error -104 when I
> specify a default character set.
> My code is:
> with IBDatabase1 do
> begin
> Params.Clear;
> SQLDialect := 3;
> DatabaseName := 'D:\julitec\julitecCONTACT\Daten\test.gdb';
> Params.Add('USER "sysdba"');
> Params.Add('PASSWORD "masterkey"');
> Params.Add('PAGE_SIZE 4096');
> Params.Add('DEFAULT CHARACTER SET ISO8859_1');
> CreateDatabase;
> end;
>

The database's character set must match the property
TIBDatabase.CharSet. You should add

CharSet := 'ISO8859_1';

before creating the database.

Hope this helps

Rolf Nussbaumer