public Vector getTables() { String TABLE_NAME = "TABLE_NAME"; String TABLE_SCHEMA = "TABLE_SCHEM"; String[] TABLE_TYPES = {"TABLE"}; Vector tables = new Vector(); // Verbindung zur Datenbank, Auslese Variablen Statement st = null; ResultSet rs = null; try { DatabaseMetaData dbmd = conn.getMetaData(); rs = dbmd.getTables(null, null, null, TABLE_TYPES); while (rs.next()) { // System.out.println(rs.getString(TABLE_NAME)); // System.out.println(rs.getString(TABLE_SCHEMA)); tables.add( rs.getString(TABLE_NAME) ); } } catch( Exception ex ) { System.out.println( ex ); } finally { try { if( null != rs ) rs.close(); } catch( Exception ex ) {} try { if( null != st ) st.close(); } catch( Exception ex ) {} } return tables; } public Vector getColumns(String tablename) { TableColumns tc; Vector liste = new Vector(); String sql = "SELECT column_name, Data_type FROM INFORMATION_SCHEMA.COLUMNS\n" + "where table_name='"+ tablename+"' "; DataTable dt1 = selectDBS(sql); ArrayList tableRows = dt1.tableRows; ArrayList tupels; for (int row = 0; row < tableRows.size(); row++) { tupels = tableRows.get(row); tc = new TableColumns(); tc.column_name = tupels.get(0); tc.data_type = tupels.get(1); liste.add(tc); } return liste; }