/** ensures that the tables we need for our example exist */ protected void ensureTables() throws java.lang.Exception { // get the data source XDataSource xDS = m_database.getDataSource(); XPropertySet xDSProps = UNO.queryPropertySet(xDS); // connect to this data source XConnection xConn = xDS.getConnection("", ""); XComponent xConnComp = UNO.queryComponent(xConn); createTableSalesman(xConn); createTableCustomer(xConn); createTableSales(xConn); // free the resources acquired by the connection xConnComp.dispose(); }