接着
public static Vector doQuery(Connection cn, String sql)
throws SQLException
{
Connection conn = cn;
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
ResultSetMetaData rsmd = rs.getMetaData();
int num = rsmd.getColumnCount();
Vector v = new Vector();
String str[];
for(; rs.next(); v.add(str))
{
str = new String[num];
for(int i = 0; i < num; i++)
{
str = Util.str_null(rs.getString(i + 1));
}
}
rs.close();
stmt.close();
return v;
}