I am having trouble using the method getTables() of class DatabaseMetaData. I
first call getCatalogs() to get the list of catalogs (databases). Then I call
getTables(s,"","%",s1); where s is a catalog name and
String[] s1={"TABLE", "VIEW"};
I get an error of (FDDEV01 is the name of the database server):
_____________________________________________________________
java.sql.SQLException: The database name component of the object qualifier must
be the name of the current database. Severity 16, State 1, Procedure 'FDDEV01
sp_tables', Line 77
Graph.QueryTableModel.getSQLTables(QueryTableModel:276) at weblogic.jdbcbase.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java:1072)
at weblogic.jdbcbase.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java:792)
at weblogic.jdbcbase.mssqlserver4.TdsStatement.execute(TdsStatement.java:210)
at weblogic.jdbcbase.mssqlserver4.TdsDatabaseMetaData.executeQuery(TdsDatabaseMetaData.java:175)
at weblogic.jdbcbase.mssqlserver4.TdsDatabaseMetaData.getTables(TdsDatabaseMetaData.java:1453)
________________________________________________________
It appears the stored procedure sp_tables in the master table is making a fuss.
Does anyone have any ideas of how to get around this? This technique works fine
with mySQL.
Regards,
Sanjeev
supa...@yahoo.com