IF connection is closed?resultset will be closed or not.
843836May 5 2004 — edited May 5 2004hi all,
i am just closing the sql connection and i am not closing the resultset.So is it must that we should close resultset?
if i close the connection resultset wont be closed automatically.?
here is my code.
s_user = conn.createStatement();
sql_user="select statment ";
rs_user=s_user.executeQuery(sql_user);
if (rs_user.next())
{
if (rs_user.getInt("found") !=0)
{
flag = rs_user.getInt("found");
out.print("flag="+ flag);
}
}
// if connection is not closed close the connection
if (!conn.isClosed())
{
conn.close();
}
if i use the above code any problem with db performance?