Board index » jbuilder » Programmatically creating a Database

Programmatically creating a Database


2003-10-25 11:18:01 AM
jbuilder19
I have a need to programmatically create a database, but I don't know how I
can issue the commands if I'm not already connect to an existing database.
Anyone know how to get around this chicken and egg problem?
- Dave Anderson
 
 

Re:Programmatically creating a Database

Dave Anderson wrote:
Quote
I have a need to programmatically create a database, but I don't know how
I
can issue the commands if I'm not already connect to an existing
database.

Anyone know how to get around this chicken and egg problem?

- Dave Anderson
It will deend upon what the JDBC driver you are using, supports.
Some JDBC Drivers have low level CLI calls to the underlying structure of
the Database engine itself and some do not offer this. You will need to
consult the doucmentation of the particular JDBC driver you are using, to
ensure they support create database calls.
Of course, you can also use native JNI calls to create a Database as well.
 

Re:Programmatically creating a Database

Thanks Paul;
I'm using MySQL and I'll look into using native JNI calls.
"pNichols" < XXXX@XXXXX.COM >wrote in message
Quote
Dave Anderson wrote:

>I have a need to programmatically create a database, but I don't know
how
>I
>can issue the commands if I'm not already connect to an existing
>database.
>
>Anyone know how to get around this chicken and egg problem?
>
>- Dave Anderson

It will deend upon what the JDBC driver you are using, supports.

Some JDBC Drivers have low level CLI calls to the underlying structure of
the Database engine itself and some do not offer this. You will need to
consult the doucmentation of the particular JDBC driver you are using, to
ensure they support create database calls.

Of course, you can also use native JNI calls to create a Database as well.
 

{smallsort}