Commit 77302523 authored by ssalve's avatar ssalve

Sarita : Done changes in FinCommon isBankCode method to resolve open cursor issue on 17NOV2017

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@173809 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d732d254
......@@ -12965,7 +12965,9 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
{
sql1 = "SELECT SITE_CODE FROM BANK WHERE BANK_CODE = '" + bankCode + "'"; //$NON-NLS-1$ //$NON-NLS-2$
stmt2 = con.createStatement();
rs2 = stmt1.executeQuery(sql1);
//Added by sarita on 17NOV2017, for open cursor issue
//rs2 = stmt1.executeQuery(sql1);
rs2 = stmt2.executeQuery(sql1);
if(rs2.next())
{
colValue = rs2.getString(1);
......@@ -12973,7 +12975,9 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
{
sql1 = "SELECT COUNT(1) FROM SITE_BANK WHERE SITE_CODE ='" + siteCode + "' AND BANK_CODE = '" + bankCode + "'"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
stmt3 = con.createStatement();
rs3 = stmt1.executeQuery(sql1);
//Added by sarita on 17NOV2017, for open cursor issue
//rs3 = stmt1.executeQuery(sql1);
rs3 = stmt3.executeQuery(sql1);
if (rs3.next())
{
counter = rs3.getLong(1);
......@@ -12993,6 +12997,38 @@ public String nfCheckPeriod(String modCode, java.util.Date tranDate , String sit
// rs3.close();
// stmt3.close();
//con.close();
//Added by sarita on 17NOV2017, for open cursor issue [start]
if(rs1 != null)
{
rs1.close();
rs1 = null;
}
if(rs2 != null)
{
rs2.close();
rs2 = null;
}
if(rs3 != null)
{
rs3.close();
rs3 = null;
}
if(stmt1 != null)
{
stmt1.close();
stmt1 = null;
}
if(stmt2 != null)
{
stmt2.close();
stmt2 = null;
}
if(stmt3 != null)
{
stmt3.close();
stmt3 = null;
}
//Added by sarita on 17NOV2017, for open cursor issue [end]
}
catch(Exception e)
{
......
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