I am fairly new at the world of JDBC and SQL. While doing some reading, I have noticed that it seems one must create an SQL database outside of JAVA and then use JDBC to access and manipulate the DB. I was wondering if there was a way, that if SQL was running as a service, there is a way in JAVA to create the DB? Maybe I just overlooked something?? Thanks for any help.
hi Gregg, I believe that there exist DB frontends working with JDBC. they need to have the ability to create databases?! maybe that depends on the db, as well. PostgreSQL has a shellscript createdb to be used outside of the postgres and thus outside of any db environment. but mysql hasn't such a script, I think. what I want to say is: maybe you can create dbs while you're already connected to one. that would solve the problem, wouldn't it? chantal
I tried creating while connected to one, then switched databases. The only problem with that is the fact that there will have to be a default DB on the system created outside of my program. But I can probably figure out a work around. I think MySQL creates a couple of databases on install, so I will probably just connect to one of those by default. Thanks