Subject RE: [Firebird-Java] SQL Scripts
Author Robert DiFalco
Thanks Rick, but I'm not sure this answers my question. Do I have to parse the SQL DDL script file and process the lines myself or is there a call I can use to execute the script and handle the parsing and comments correctly?

R.

-----Original Message-----
From: Rick Fincher [mailto:rnf@tbird.com]
Sent: Tue 3/11/2003 8:45 PM
To: Firebird-Java@yahoogroups.com
Cc:
Subject: Re: [Firebird-Java] SQL Scripts


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

----- 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



Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=246920.2960106.4328965.2848452/D=egroupweb/S=1705006764:HM/A=1481558/R=0/*http://www.gotomypc.com/u/tr/yh/cpm/grp/300_DIR/g22lp?Target=mm/g22lp.tmpl>
<http://us.adserver.yahoo.com/l?M=246920.2960106.4328965.2848452/D=egroupmail/S=:HM/A=1481558/rand=972601154>

To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .