Subject | DatabaseMetaData.getTables() : Unrecognized transaction ??? |
---|---|
Author | totallkm |
Post date | 2004-05-17T19:24:52Z |
The same piece of code running against 5 other databases causes no
error, but it keeps throwing:
org.firebirdsql.jdbc.FBSQLException: Resource Exception. Unrecognized
transaction
or returning null (depending on args)
I have spent too much time trying all sorts of possible combinations
for the arguments to getTables(..), but none have worked.
Am I missing something? Access rights?
What kind of permission do you need to look at the catalog?
The same user can run all the other tests and create hundreds of
tables, drop them, insert/delete...
This is with firebird latest 1.5 driver
driverClass = "org.firebirdsql.jdbc.FBDriver"
url = "jdbc:firebirdsql://127.0.0.1:3050/opt/firebird/mydbname";
Here is the sample code that I use:
try {
dmd = con.getMetaData();
String catalog = null;
rs = dmd.getSchemas();
while (rs.next()) {
String sn = rs.getString(1);
System.out.println(".getAllTables() schema="+sn);
}
rs.close();
rs = dmd.getCatalogs();
while (rs.next()) {
String sn = rs.getString(1);
System.out.println(".getAllTables() catalogs="+sn);
}
rs.close();
rs = dmd.getTables(null, null, "%", new String[]
{"TABLE"}); //org.firebirdsql.jdbc.FBDatabaseMetaData.ALL_TYPES);
//null); //new String[] {"TABLE"});
System.out.println(".getAllTables() rs="+rs);
while (rs.next()) {
String tn = rs.getString("TABLE_NAME");
String tt = rs.getString("TABLE_TYPE");
String remarks = rs.getString("REMARKS");
names.addElement(tn);
System.out.println(".getAllTables() found table
"+tn+", type="+tt+", remarks="+remarks);
}
error, but it keeps throwing:
org.firebirdsql.jdbc.FBSQLException: Resource Exception. Unrecognized
transaction
or returning null (depending on args)
I have spent too much time trying all sorts of possible combinations
for the arguments to getTables(..), but none have worked.
Am I missing something? Access rights?
What kind of permission do you need to look at the catalog?
The same user can run all the other tests and create hundreds of
tables, drop them, insert/delete...
This is with firebird latest 1.5 driver
driverClass = "org.firebirdsql.jdbc.FBDriver"
url = "jdbc:firebirdsql://127.0.0.1:3050/opt/firebird/mydbname";
Here is the sample code that I use:
try {
dmd = con.getMetaData();
String catalog = null;
rs = dmd.getSchemas();
while (rs.next()) {
String sn = rs.getString(1);
System.out.println(".getAllTables() schema="+sn);
}
rs.close();
rs = dmd.getCatalogs();
while (rs.next()) {
String sn = rs.getString(1);
System.out.println(".getAllTables() catalogs="+sn);
}
rs.close();
rs = dmd.getTables(null, null, "%", new String[]
{"TABLE"}); //org.firebirdsql.jdbc.FBDatabaseMetaData.ALL_TYPES);
//null); //new String[] {"TABLE"});
System.out.println(".getAllTables() rs="+rs);
while (rs.next()) {
String tn = rs.getString("TABLE_NAME");
String tt = rs.getString("TABLE_TYPE");
String remarks = rs.getString("REMARKS");
names.addElement(tn);
System.out.println(".getAllTables() found table
"+tn+", type="+tt+", remarks="+remarks);
}