Commit e7e979ad authored by steurwadkar's avatar steurwadkar

Open cursor changes comitted

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@157259 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f5718b2c
......@@ -178,7 +178,18 @@ public class GSTRWebServiceDao extends ValidatorEJB {
cnt = rs.getInt(1);
}
System.out.println("COUNT"+cnt);
//Added by Santosh on 08-09-17 to resovle open cursor issue [Start]
if(pstmt2!=null)
{
pstmt2.close();
pstmt2=null;
}
if(rs!=null)
{
rs.close();
rs=null;
}
//Added by Santosh on 08-09-17 to resovle open cursor issue [End]
if(cnt==0 && (taxRegNo != "") && taxRegNo.trim().length() != 0)
......@@ -196,6 +207,18 @@ public class GSTRWebServiceDao extends ValidatorEJB {
//newgstcode=rs.getString(4);
}
//Added by Santosh on 08-09-17 to resovle open cursor issue [Start]
if(pstmt2!=null)
{
pstmt2.close();
pstmt2=null;
}
if(rs!=null)
{
rs.close();
rs=null;
}
//Added by Santosh on 08-09-17 to resovle open cursor issue [End]
System.out.println("newgstno"+newgstcode);
System.out.println("newstatecode"+newstatecode);
System.out.println("newname"+newname);
......@@ -210,7 +233,16 @@ public class GSTRWebServiceDao extends ValidatorEJB {
pstmt2.setString(1,taxRegNo);
pstmt2.setString(2,custName);
pstmt2.setString(3,newgstcode);
pstmt2.executeQuery();
//pstmt2.executeQuery();
pstmt2.executeUpdate();
//Added by Santosh on 08-09-17 to resovle open cursor issue [Start]
if(pstmt2!=null)
{
pstmt2.close();
pstmt2=null;
}
//Added by Santosh on 08-09-17 to resovle open cursor issue [End]
}
......@@ -262,7 +294,15 @@ public class GSTRWebServiceDao extends ValidatorEJB {
pstmt.setString(39,gstType);
pstmt.setString(40,refId);
pstmt.executeUpdate();
pstmt.executeUpdate();
//Added by Santosh on 08-09-17 to resovle open cursor issue [Start]
if(pstmt!=null)
{
pstmt.close();
pstmt=null;
}
//Added by Santosh on 08-09-17 to resovle open cursor issue [End]
DetData="Insert into GST_DATA_DET (TRAN_ID,LINE_NO,STATUS,SR_NO__OLD,LINE_TYPE,GS_CODE,TAXABLE_AMT,IGST_PERC,IGST_AMT,CGST_PERC,CGST_AMT,SGST_PERC,SGST_AMT,GS_DESCR,UNIT,QUANTITY,SUPPLY_TYPE,CESS_PERC,CESS_AMT,REMARKS,ITC_TYPE,ITC_IGST,ITC_CGST,ITC_SGST,ITC_CESS,GST_RATE) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt1 = conn.prepareStatement(DetData);
......@@ -360,6 +400,13 @@ public class GSTRWebServiceDao extends ValidatorEJB {
}
pstmt1.executeBatch();
//Added by Santosh on 08-09-17 to resovle open cursor issue [Start]
if(pstmt1!=null)
{
pstmt1.close();
pstmt1=null;
}
//Added by Santosh on 08-09-17 to resovle open cursor issue [End]
}
......@@ -387,7 +434,18 @@ public class GSTRWebServiceDao extends ValidatorEJB {
{
pstmt1.close();pstmt1 = null;
}
//Added by Santosh on 08-09-17 to resovle open cursor issue [Start]
if(pstmt2!=null)
{
pstmt2.close();
pstmt2=null;
}
if(rs!=null)
{
rs.close();
rs=null;
}
//Added by Santosh on 08-09-17 to resovle open cursor issue [End]
if(isError)
{
System.out.println("Inside Dao rollbacking....");
......
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