Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Rednevac

[java] create databse

This topic is 6094 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, This does not really pertain to game development but since there are a lot of good developers here I come here anyway. Is there a way and if so, how do I create a database in Java. Typically I would have to use the DBMS to do this, but ADOX and DAO lets me create a database through my code. Does JDBC have the same functionality? I have search through Sun''s documentation but all the examples use an existing database. This of course does me no good as my app needs to create one. Thanks in advance Joe

Share this post


Link to post
Share on other sites
Advertisement
JDBC passes calls directly, so:

Statement ps = con.prepareStatement( "create table my table( blah blah )" );
ps.executeUpdate();


I''d recommend doing this stuff in your SQL interface though, since you don''t (and shouldn''t) do it regularly.

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
Community Service Announcement: Read How to ask questions the smart way before posting!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!