Re: Detecting if a table in a database already exists ?
From: Darren Davison (no.spam_at_here.please)
Date: 10/13/04
- Next message: Robert Schneider: "Re: Java on iSeries: setBinaryStream problem"
- Previous message: Daniel Dittmar: "Re: Unable to load JdbcOdbc library"
- In reply to: Thorsten Meininger: "Detecting if a table in a database already exists ?"
- Next in thread: Sebastian Scheid: "Re: Detecting if a table in a database already exists ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 12 Oct 2004 23:38:10 +0100
Thorsten Meininger wrote:
> Sorry for this newbie question:
> How do I find out from a java source if a table in a database already
> exists?
>
> I cannot believe that I have to execute a SELECT statement and if there is
> an exception I know that the table does not exist. But this is a really
> inconvenient solution. There must be a direct request statement.
get the DatabaseMetaData from your connection. See it's JavaDoc for
capabilities.
-- darren@ public key davison|uk.net #DD356B0D
- Next message: Robert Schneider: "Re: Java on iSeries: setBinaryStream problem"
- Previous message: Daniel Dittmar: "Re: Unable to load JdbcOdbc library"
- In reply to: Thorsten Meininger: "Detecting if a table in a database already exists ?"
- Next in thread: Sebastian Scheid: "Re: Detecting if a table in a database already exists ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|