Commit 4f06009f authored by prane's avatar prane

closed and null set to cursor and pstmt

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@197664 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1aa39a50
...@@ -525,6 +525,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -525,6 +525,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
errString= checkNull((String)commissionMap.get("errorStr")); errString= checkNull((String)commissionMap.get("errorStr"));
if(errString.trim().length() > 0) if(errString.trim().length() > 0)
{ {
rs.close(); rs = null;//23feb19[to close the cursor and pstmt while returning string]
pstmt.close();pstmt = null;
return errString; return errString;
} }
spComm1 = checkDouble((Double)commissionMap.get("sp1Comm")); spComm1 = checkDouble((Double)commissionMap.get("sp1Comm"));
...@@ -543,6 +545,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -543,6 +545,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
//check if total commision exceeds Order Amount. //check if total commision exceeds Order Amount.
if(totalCommAmt > ordAmount) if(totalCommAmt > ordAmount)
{ {
rs.close(); rs = null;//23feb19[to close the cursor and pstmt while returning string]
pstmt.close();pstmt = null;
errString = itmDBAccessLocal.getErrorString("","VTCOMMERR","","",conn);//removed single quotes from msg_no by nandkumar gadkari on 2/02/19 errString = itmDBAccessLocal.getErrorString("","VTCOMMERR","","",conn);//removed single quotes from msg_no by nandkumar gadkari on 2/02/19
return errString; return errString;
} }
...@@ -560,6 +564,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -560,6 +564,8 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt1 = null; pstmt1 = null;
if(updCnt <= 0) if(updCnt <= 0)
{ {
rs.close(); rs = null;//23feb19[to close the cursor and pstmt while returning string]
pstmt.close();pstmt = null;
errString = itmDBAccessLocal.getErrorString("","VTNCONFT","","",conn);//removed single quotes from msg_no by nandkumar gadkari on 2/02/19 errString = itmDBAccessLocal.getErrorString("","VTNCONFT","","",conn);//removed single quotes from msg_no by nandkumar gadkari on 2/02/19
return errString; return errString;
} }
...@@ -1398,6 +1404,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -1398,6 +1404,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt1 = null; pstmt1 = null;
if (updCnt < 0) if (updCnt < 0)
{ {
rs.close();//23feb19[to close the cursor and pstmt while returning string]
rs = null;
pstmt.close();
pstmt = null;
errString = itmDBAccessLocal.getErrorString("","VTNCONFT","","",conn); errString = itmDBAccessLocal.getErrorString("","VTNCONFT","","",conn);
return errString; return errString;
} }
...@@ -1422,6 +1432,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -1422,6 +1432,10 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
{ {
if(explodeBomDs(saleOrder,itemCode,expLev,lineNo,lineType,conn) !=1) if(explodeBomDs(saleOrder,itemCode,expLev,lineNo,lineType,conn) !=1)
{ {
rs1.close();//23feb19[to close the cursor and pstmt while returning string]
rs1 = null;
pstmt1.close();
pstmt1 = null;
errString = itmDBAccessLocal.getErrorString("","DS000","","",conn); errString = itmDBAccessLocal.getErrorString("","DS000","","",conn);
return errString; return errString;
} }
...@@ -2922,13 +2936,16 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor ...@@ -2922,13 +2936,16 @@ public class SorderConf extends ActionHandlerEJB implements SorderConfLocal, Sor
pstmt2=null; pstmt2=null;
} }
} }//20feb19[to close the cursor and pstmt while returning string]
}
rs1.close(); rs1.close();
rs1 = null; rs1 = null;
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
}
/*rs1.close();
rs1 = null;
pstmt1.close();
pstmt1 = null;*/
rs.close(); rs.close();
......
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