Subject Re: [Firebird-Java] Re: DatabaseMetaData
Author Massimo Ferrari
Thank you.
Just a note: the statement produced (copied at the bottom) works smoothly on
isql.

A question: why does the FBPreparedStatement constructor not declare
c.checkEndTransaction();
in a finally block?
When I get the error caused by getTables, my connection pooling system tries
to close
the connection but gets an error:
java.lang.IllegalStateException: Can't destroy managed connection with
active transaction

If I'm not wrong, putting c.checkEndTransaction(); in a finally block would
help
(and maybe also putting super(c); in the try block)

Regards
Massimo



-----------------------------------------------------------
select null as TABLE_CAT,
null as TABLE_SCHEM,
RDB$RELATION_NAME as TABLE_NAME,
cast('SYSTEM TABLE' as varchar(31)) as TABLE_TYPE,
RDB$DESCRIPTION as REMARKS,
RDB$OWNER_NAME as OWNER_NAME
from RDB$RELATIONS
where 'F' = 'T'
and RDB$SYSTEM_FLAG = 1
and RDB$VIEW_SOURCE is null
union
select null as TABLE_CAT,
null as TABLE_SCHEM,
RDB$RELATION_NAME as TABLE_NAME,
cast('TABLE' as varchar(31)) as TABLE_TYPE,
RDB$DESCRIPTION as REMARKS,
RDB$OWNER_NAME as OWNER_NAME
from RDB$RELATIONS
where 'T' = 'T'
and RDB$SYSTEM_FLAG = 0
and RDB$VIEW_SOURCE is null
union
select null as TABLE_CAT,
null as TABLE_SCHEM,
RDB$RELATION_NAME as TABLE_NAME,
cast('VIEW' as varchar(31)) as TABLE_TYPE,
RDB$DESCRIPTION as REMARKS,
RDB$OWNER_NAME as OWNER_NAME
from RDB$RELATIONS
where 'F' = 'T'
and RDB$VIEW_SOURCE is not null



----- Original Message -----
From: "rrokytskyy" <rrokytskyy@...>
To: <Firebird-Java@yahoogroups.com>
Sent: Saturday, April 20, 2002 9:57 PM
Subject: [Firebird-Java] Re: DatabaseMetaData


> This seems to be bug in implementation, I will check it. You might
> try not providing wildcard at all, should work.
>
> Thanks!
>
> Roman Rokytskyy
>
> --- In Firebird-Java@y..., "Massimo Ferrari" <massimo@r...> wrote:
> > Hi, I get an error executing this code
> >
> > DatabaseMetaData dmd = conn.getMetaData();
> > ResultSet rs = dmd.getTables(null, null, "%", new String[]
> {"TABLE"});
> >
> > java.sql.SQLException: GDSException:
> org.firebirdsql.gds.GDSException:
> > Dynamic SQL Error
> > SQL error code = -901
> > feature is not supported
> > at
> > org.firebirdsql.jdbc.FBPreparedStatement.<init>
> (FBPreparedStatement.java:89)
> > at
> > org.firebirdsql.jdbc.FBConnection.prepareStatement
> (FBConnection.java:178)
> > at
> > org.firebirdsql.jdbc.FBDatabaseMetaData.getStatement
> (FBDatabaseMetaData.java
> > :4172)
> > at
> > org.firebirdsql.jdbc.FBDatabaseMetaData.doQuery
> (FBDatabaseMetaData.java:4189
> > )
> > at
> > org.firebirdsql.jdbc.FBDatabaseMetaData.getTables
> (FBDatabaseMetaData.java:20
> > 50)
> >
> > Hovewer, I don't think it is firebird that dose not support that
> feature,
> > since the same code with interclient works.
> > Are there any alternatives?
> >
> > Regards
> > Massimo
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>