public void copyTable(final DatabaseApplication sourceDb,final DatabaseApplication destDb) throws Exception, IOException, java.lang.Exception
{
final XConnection destConnection = destDb.getDocumentUI().getActiveConnection();
final XConnection sourceConnection = sourceDb.getDocumentUI().getActiveConnection();
final XTablesSupplier suppTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, sourceConnection);
final XNameAccess tables = suppTables.getTables();
final String[] names = tables.getElementNames();
for (int i = 0; i < names.length; i++)
{
copyTable(names[i], sourceConnection, destConnection);