public ArrayList getDBTables(String dbName)throws Exception
{
//数据库表名List
ArrayList<String> tbList = new ArrayList<String>();
//获取数据库元数据
DatabaseMetaData dbMetaData = new DatabaseMetaData((com.mysql.jdbc.Connection) getConn(), dbName);
//类型()
String[] types = {"TABLE","VIEW"};
rs = dbMetaData.getTables(null, dbName, "%", types);
while(rs.next())
{
tbList.add(rs.getString(3));
}
return tbList;
}
posted @
2010-09-17 10:40
hank001
阅读(
336)
评论()
编辑
收藏
举报