Subject Re: [Firebird-Java] Create database with Jaybird...using charset?
Author Helen Borrie
At 07:45 AM 13/01/2004 +1300, you wrote:
>Is there a way to set the charset for a newly created DB within a java app
>with a charset specified?
>
>I use Tomcat and would like to ISO8859_1

It is a parameter of the CREATE DATABASE statement itself.

CREATE DATABASE 'Myserver:D:\data\ADatabase.fdb'
PAGE_SIZE 8192
DEFAULT CHARACTER SET ISO8859_1
USER 'SYSDBA'
PASSWORD 'masterkey';

>Also tried..
>
>PreparedStatement ps = null; //and Statement
>...
>ps.execute( "CREATE DATABASE XYZ.FDB ...

Note the single quotes on strings.

>
>Any platform or version.

You can't do a platform-neutral CREATE DATABASE statement because of
differences in filesystem syntax. On POSIX, the statement would be:

CREATE DATABASE 'MyLinux:/data/ADatabase.fdb'
PAGE_SIZE 8192
DEFAULT CHARACTER SET ISO8859_1
USER 'SYSDBA'
PASSWORD 'masterkey';

Once a database is created, from Fb 1.5 forward you *can* use
platform-neutral syntax for CONNECT, by means of database aliasing.

>Any suggestions or Manual references appreciated.

The Language Reference of the IB 6 beta docs + releasenotes for Fb 1.0 and
Fb 1.5 (two docs) currently comprehend the total Firebird SQL language.

The Firebird Quick Start Guide might help. At present it's current up to
Fb 1.0.x.

Would you please post list messages in plain text.
Thks
HB