Lyon, Bruce wrote:
This is driving me spare. I have been trying to access Derby metadata and have been unable to get some rather basic functions to work. In particular, I cannot get getImportedKeys() or getTables() to return any rows. I can get a DatabaseMetaData object and perform various function calls, such as getCatalogs() or getSchemas() on it. However, when I call getTables() or getImportedKeys() I get a ResultSet with no rows. I can print the columns of the ResultSet, but it has no rows. Why is this? The following code in a servlet can print out the catalog/sechema data, but it cannot get any table names; and when I try to print the foreign keys from the “policy” table (which does exist in this database) the ResultSet has no rows, even though the “policy” table has two columns that are foreign keys.
Did you quote the name of the "policy" table when you created it? If not, I think you need to write the name in upper case, when using getImportedKeys().
-- Øystein
