views:

28

answers:

1

I have a simple program I am working on, right now I am working in netbeans and using the derby database, in memory, and have it set to create the database if it doesn't exist.

 Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/memory:APP;create=true", "APP", "APP");

My question is... while it creates the database, it does not create the table structure.. how do I get the program to create that as well?

+2  A: 

Look at this link it has how to create a table programatically from Java.
This link tells you how to populate the table with Data.

Romain Hippeau
Thank you, that was exactly what I needed!
Jason
@Jason - thx for accepting an answer.
Romain Hippeau
if your using JPA/Hibernate over a derby DB do you have any links that outline the hibernate parameters to set to ensure that schema/tables are created automatically?
emeraldjava
@emeraldjava - Maybe you might want to post that as a question on this site ?
Romain Hippeau