db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul J. Lucas" <pauljlu...@mac.com>
Subject Running for the first time
Date Fri, 13 May 2005 03:01:38 GMT
 	I want to use Derby embedded in a Java application.  The first
 	time it runs the database won't exist so I'll have to create it
 	and all the tables it needs.  Then, for all subsequent times
 	it's run, it just runs without creating anything.

 	Is there a canonical way to do this?  Should I always pass the
 	"create=true" as part of the connection URL and if I get a
 	warning, don't create the tables?  Or try to access the
 	database, catch an exception about it not existing, then create
 	it?

 	Also, if it's not too much trouble, I'm new to using JDBC so I'm
 	wondering how SQLWarnings are caught.  They're derived from
 	SQLException, but does that mean that SQLWarnings are thrown and
 	must be caught using a try/catch block?  Or are warnings caught
 	some other way?

 	Thanks.

 	- Paul

Mime
View raw message