Subject | Re: [Firebird-Java] SQL Scripts |
---|---|
Author | Rick Fincher |
Post date | 2003-03-12T04:45:54Z |
Hi Robert,
You can use fbManager to create the database. After that you can use sql
calls to do the rest. This is from FAQ #33:
You can use the methods in FBManager in the package
org.firebirdsql.management to easily create a new database in your programs.
After creation you can connect to the database and use the standard SQL
calls to create tables and populate them.
This is an example:
String DB_SERVER_URL = "localhost";
int DB_SERVER_PORT = 3050;
String DB_PATH = "c:/database";
String DB_NAME = "test.gdb";
String DB_USER = "sysdba";
String DB_PASSWORD = "masterkey";
fbManager.setServer(DB_SERVER_URL);
fbManager.setPort(DB_SERVER_PORT);
fbManager.start();
fbManager.createDatabase(DB_PATH + "/" + DB_NAME, DB_USER, DB_PASSWORD);
Rick
You can use fbManager to create the database. After that you can use sql
calls to do the rest. This is from FAQ #33:
You can use the methods in FBManager in the package
org.firebirdsql.management to easily create a new database in your programs.
After creation you can connect to the database and use the standard SQL
calls to create tables and populate them.
This is an example:
String DB_SERVER_URL = "localhost";
int DB_SERVER_PORT = 3050;
String DB_PATH = "c:/database";
String DB_NAME = "test.gdb";
String DB_USER = "sysdba";
String DB_PASSWORD = "masterkey";
fbManager.setServer(DB_SERVER_URL);
fbManager.setPort(DB_SERVER_PORT);
fbManager.start();
fbManager.createDatabase(DB_PATH + "/" + DB_NAME, DB_USER, DB_PASSWORD);
Rick
----- Original Message -----
> I searched the archives and heard that one cannot execute SQL
> Scripts (e.g. createdb.sql) such as those created by IB Expert to
> create a database schema using the JayBird JDBC driver. Is this
> correct?
>
> If it is, do I have to write my own SQL script parser or is there
> one already available for use with JayBird/Firebird?
>
> Tia,
>
> Robert