You would need autocommit to be off. My guess is that might be the problem.
Mamta
Emmanuel Cecchet wrote:
> Hi all,
>
> I am using Derby with Network server and the DB2 universal connector. I
> have problems retrieving metadata from Derby.
> If I run the following code:
> DatabaseMetaData metaData = connection.getMetaData();
> String[] types = {"TABLE", "VIEW"};
> ResultSet rs = metaData.getTables(null, null, "%", types);
>
> The ResultSet (rs) is not null but closed and any call to rs.next()
> fails reporting that the ResultSet is closed.
>
> Any idea why this happens?
> Thanks for your help,
> Emmanuel