db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Kartha <karth...@gmail.com>
Subject Re: MetaData problem
Date Wed, 11 Oct 2006 18:41:05 GMT
By default in Derby, the table names are stored internally in CAPS. 
Hence  you should use:

ResultSet rs=dbmd.getColumns(null,null,"MYTABLE", null);

However if the tablename is created in a case-sensitive manner like:

create table "myTable"(i int, j char(1), k char(2), l char(3));

then

dbmd.getColumns(null,null,"myTable", null); 

should work.

HTH,
-Rajesh


NLA Systems Ltd wrote:

> Hello all
>
> This is my first post to this list.
>
> I am connecting to a Derby database in embedded mode among other 
> databases.
> I have the code below to get all the columns of a table. This code 
> works fine with all my other databases but not with Derby. It seems 
> that the getColumns() method is returning an empty resultset. I hope 
> someone can give me a hint on why this is happening. Thanks a lot!
>
>
>
> DatabaseMetaData dbmd=dbConn.dbConnection.getMetaData();
> ResultSet rs=dbmd.getColumns(null,null,"myTable", null);
>
> while (rs.next()) {
>         .......                                     
>                     }
>                 }
>
> I am using release 10.1.2.0
>
> Regards
> Noel
>


Mime
View raw message