这个结构正确吗?还是有任何错误/坏习惯?
public static ResultSet getRecord(String id)
{
Connection conn = DataBase.Connect();
try
{
try
{
Statement stm = conn.createStatement();
ResultSet data = stm.executeQuery("SELECT * FROM " + GlobalFields.Records + " WHERE id = '" + id + "';");
return data;
}
finally
{
conn.close();
}
}
catch(SQLException e)
{
e.printStackTrace();
}
return null;
}