Try % instead of null.
Ali

--- On Sun, 11/9/08, Ole Ersoy <[EMAIL PROTECTED]> wrote:

> From: Ole Ersoy <[EMAIL PROTECTED]>
> Subject: Re: DatabaseMetaData.getTables() resultset empty?
> To: "Derby Discussion" <[email protected]>
> Date: Sunday, November 9, 2008, 8:12 PM
> Emmanuel,
> 
> I gave it a go.
> 
> String[] types = {"TABLE", "VIEW"};
> ResultSet resultSet = metaData.getTables(null, null,
> "%", types);
> 
> But resultset is still empty.
> 
> Thanks though,
> - Ole
> 
> 
> 
> 
> Emmanuel Cecchet wrote:
> > Ole,
> > 
> > It might be that Derby does not like it when the types
> are set to null.
> > In Sequoia, I use something like that and it works:
> >        String[] types = {"TABLE",
> "VIEW"};
> >        rs = connectionMetaData.getTables(null, null,
> "%", types);
> > 
> > Let me know if that works for you,
> > Emmanuel
> > 
> >> 
> >> I'm trying to use DatabaseMetaData.getTables()
> to get a list of tables contained in a derby database.  I
> run the statement like this (I made sure tables are present
> by browsing using the eclipse Data Source explorer first):
> >> 
> >> ResultSet resultSet = metaData.getTables(null,
> null, "%", null);
> >> 
> >> But resultSet is empty.  I also tried it like
> this:
> >> 
> >> ResultSet resultSet = metaData.getTables(null,
> null, "EXISTING_TABLE_NAME", null);
> >> 
> >> Still no love.  Anyone have any ideas on what I
> could be doing better? Thanks,
> >> - Ole


      

Reply via email to