dbmodel.addTable(tables.getString(3), dbs.getString(1));
ResultSet columns = dbmeta.getColumns("", dbs.getString(1),tables.getString(3), "%"); while(columns.next()) { table.addColumn(columns.getString(4)); } table.setSchema(dbs.getString(1)); table.setName(tables.getString(3));  dbmodel.addTable(table);
	public void addToTable(DataSourceConfig dsc, TreePath tp) {		DatabaseMetaData dbmeta = null;		ResultSet dbs = null;		Connection conn = null;		try {			System.out.println(dsc.getDriver());			Class.forName(dsc.getDriver());			// Connection mysql = DriverManager.getConnection(JDBMain.DBURL,			// JDBMain.DBUSER, JDBMain.DBPASSWORD);			try {				System.out.println(dsc.getUrl() + "\t" + dsc.getUserid() + "\t" + dsc.getPassword());				conn = DriverManager.getConnection(dsc.getUrl(), dsc.getUserid(), dsc.getPassword());				dbmeta = conn.getMetaData();			} catch (SQLException e) {				e.printStackTrace();			}			if (dbmeta.supportsSchemasInTableDefinitions()) { // mainly				// oracle				System.out.println("Runnig on : " + dbmeta.getDatabaseProductName());				dbs = dbmeta.getSchemas();				TreeIter databaseconfig = ls.getIter(tp.toString());				// ls.setData("databaseinfo_"+dsc.getAlias(), dsc);				// ls.setValue(databaseconfig, ColData, dsc.getAlias());				DatabaseModel dbmodel = new DatabaseModel();				dbmodel.setDatabasename(tp.toString());				while (dbs.next()) {					TreeIter dbrow = ls.appendRow(databaseconfig);					ls.setValue(dbrow, ColData, dbs.getString(1));					// SqlView.getCombobox_database().appendText(""+dbs.getString(1));					SqlView.getCombobox_database().addData(dbs.getString(1), "" + dbs.getString(1), dsc);					TreeIter tablesrow;					String[] types = { "TABLE" };					ResultSet tables = dbmeta.getTables("", dbs.getString(1), "%", types);					while (tables.next()) {						tablesrow = ls.appendRow(dbrow);						// System.out.println(tables.getString(3));						ls.setValue(tablesrow, ColData, tables.getString(3));						dbmodel.addTable(tables.getString(3), dbs.getString(1));					}					dbmodel.dumpTables();					DataModelHelper.setModel(dbmodel);					tables.close();				}			} else {				System.out.println("Runnig on witn no schemas : " + dbmeta.getDatabaseProductName());				String[] types = { "TABLE" };				dbs = dbmeta.getCatalogs();				// TreeIter databaseconfig = ls.appendRow(null);				TreeIter databaseconfig = ls.getIter(tp.toString());				ls.setValue(databaseconfig, ColData, dsc.getAlias());				ls.setData("databaseinfo_" + dsc.getAlias(), dsc);				while (dbs.next()) {					TreeIter dbrow = ls.appendRow(databaseconfig);					ls.setValue(dbrow, ColData, dbs.getString(1));					SqlView.getCombobox_database().addData(dbs.getString(1), "" + dbs.getString(1), dsc);					TreeIter tablesrow;					// System.out.println(dbs.getString(1));					ResultSet tables = dbmeta.getTables(dbs.getString(1), "", "%", types);					while (tables.next()) {						tablesrow = ls.appendRow(dbrow);						// System.out.println(tables.getString(3));						ls.setValue(tablesrow, ColData, tables.getString(3));					}					tables.close();				}			}			System.out.println(SqlView.getCombobox_database().getData("smatest"));			list.showAll();		} catch (ClassNotFoundException e) {			e.printStackTrace();		} catch (SQLException e) {			e.printStackTrace();		} finally {			try {				if (dbs != null)					dbs.close();				if (conn != null)					conn.close();			} catch (SQLException e) {				e.printStackTrace();			}		}	}