catch(Exception e){
e.printStackTrace();
}
}
conn.close();
................
public synchronized java.sql.ResultSet getTables(java.sql.Connection conn) throws SQLException {
//checkOpen();
String[] types = new String[]{"TABLE"};
String t =
null;
t = (t == null || "".equals(t)) ? "%" : t.toUpperCase();
String sql = "select" + " null as TABLE_CAT," + " null as TABLE_SCHEM," + " name as TABLE_NAME,"
+ " upper(type) as TABLE_TYPE," + " null as REMARKS," + " null as TYPE_CAT," + " null as TYPE_SCHEM,"
+ " null as TYPE_NAME," + " null as SELF_REFERENCING_COL_NAME," + " null as REF_GENERATION"
+ " from (select name, type from sqlite_master union all"
+ " select name, type from sqlite_temp_master)"
+ " where TABLE_NAME like '" + escape(t) + "'";
if (types != null) {
sql += " and TABLE_TYPE in (";
for (int i = 0; i < types.length; i++) {
if (i > 0) {
sql += ", ";
}
sql += "'" + types[i].toUpperCase() + "'";
}
sql +=
")";
}
sql += ";";
//return conn.createStatement().executeQuery(sql);