db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: checking for the existence of tables, how?
Date Thu, 18 Sep 2008 14:37:24 GMT

----- Original Message ----- 
From: "Maarten Meijer" <mm105@xs4all.nl>
To: <derby-user@db.apache.org>
Sent: Thursday, September 18, 2008 1:42 PM
Subject: checking for the existence of tables, how?

>I have an application that store data locally in a embedded database.
> it uses ;create=true in the jdbc URL so the db is created if it is not 
> already there.
> But next I would like to query it for the existence of some tables.
> How can I do that?
> More in general, how can i get meta data such as column names from a 
> Derby DB?

I havnt tried META functions in java but in theory you should be able to 
query and iterate thru tables...

In practice.. most coders will simply create it again... it will throw an 
exception... already exists... you trap that and thats how you know...

Have fun...

HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm

View raw message