We are using an application framework which connects to HXTT DBF to user FoxPro data. Inside this framework, we see a duplication of tables and columns for all tables that are part of a foxpro database container. We do not see similar issues for free tables. In other words, when we view the schema, we see double entries for all of the tables that are contained in the database container, and within those tables we see all of the columns duplicated. We do not see duplicates for any free tables.
When viewing the data through Squirrel SQL for the same URL, we don't see the duplicates (as expected) but there are two catalogs visible, one called _CURRENT_, and one with the catalog name (in our case matmgt.dbc). It is our thinking that maybe the application framework is mashing these two catalogs into one schema.
Is the _CURRENT_ catalog always part of the meta data that HXTT exposes? Is there a way to ensure that only the tables in the catalog are part of the meta data that HXTT exposes? I've tried adding the container name to the connection URL, but for some reason I can't connect when I do that, even though I did see a reference to using that format in the documentation somewhere.
Appreciate your help.
Replied yesterday. Copied:
_CURRENT_ is a pseudo catalog(or schema name) which returns the current catalog (or schema). For instance,
select pay_quarter from _current_.book2018 WHERE item = 'Carol';
connection.setCatalog("matmgt.dbc");//or other catalog name.
_CURRENT_ (speical catalog name, or null catalog name) contains all free tables, and matmgt.dbc (catalog name) contains only those tables in matmgt.dbc .
> Inside this framework, we see a duplication of tables and columns for all tables that are part of a foxpro database container.
Try to check TABLE_CAT column of DatabaseMetaData .
Another way is to use jdbc:dbf://yourpath/matmgt.dbc as jdbc url to filter all free tables.
I guess that your application framework is using "%" for catalog name so that it return all