Commit baec2bb4 authored by manohar's avatar manohar

unclosed statment, result set closed


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93012 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b675cdbc
......@@ -77,6 +77,11 @@ public class ConsumeOrderCnc extends ActionHandlerEJB implements ConsumeOrderCnc
{
status = rs.getString("STATUS");
}
rs.close();
rs = null;
stmt.close();
stmt = null;
System.out.println("consOrd:"+consOrd+":status:"+status+":");
if(status != null && status.trim().length() > 0 )
{
......@@ -97,19 +102,21 @@ public class ConsumeOrderCnc extends ActionHandlerEJB implements ConsumeOrderCnc
pstmt.setDate(1,new java.sql.Date(System.currentTimeMillis()));
pstmt.setString(2,consOrd);
rows = pstmt.executeUpdate();
pstmt.close();
pstmt = null;
System.out.println("*ConsumeOrdCanc:rows:"+rows);
if(rows <= 0)
{
errCode="DS000NR";
}
}//end of else
} //end of if
if(rows > 0)
else if(rows > 0)
{
conn.commit();
errCode="VTCANC1";
System.out.println("\n <==== Table Updated Successfully ====>");
}
}//end of else
} //end of if
if (errCode != null && errCode.trim().length() > 0)
{
System.out.println("ConsOrdCanc:errCode:"+errCode);
......@@ -128,7 +135,26 @@ public class ConsumeOrderCnc extends ActionHandlerEJB implements ConsumeOrderCnc
try
{
System.out.println("Closing Connection.....");
if (rs != null)
{
rs.close();
rs = null;
}
if (stmt != null)
{
stmt.close();
stmt = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (conn != null)
{
conn.close();
conn = null;
}
}catch(Exception e){}
}
return errString;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment