Commit 7e4f433e authored by vkadam's avatar vkadam

Close result set 2 and pstmt 2


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98071 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 855f1f9d
...@@ -124,7 +124,7 @@ public class MatchVoucherConfSch implements Schedule ...@@ -124,7 +124,7 @@ public class MatchVoucherConfSch implements Schedule
rs4 = pstmt4.executeQuery(); rs4 = pstmt4.executeQuery();
while (rs4.next()) while (rs4.next())
{ {
voucherNo=rs4.getString("TRAN_ID"); voucherNo=checkNull(rs4.getString("TRAN_ID"));
} }
rs4.close(); rs4.close();
rs4=null; rs4=null;
...@@ -134,8 +134,8 @@ public class MatchVoucherConfSch implements Schedule ...@@ -134,8 +134,8 @@ public class MatchVoucherConfSch implements Schedule
/**UPDATE voucherNo in table 'SUPPLIER_BILL'*/ /**UPDATE voucherNo in table 'SUPPLIER_BILL'*/
sql5 = "UPDATE SUPPLIER_BILL set VOUCHER_NO=? WHERE TRAN_ID=?"; sql5 = "UPDATE SUPPLIER_BILL set VOUCHER_NO=? WHERE TRAN_ID=?";
pstmt5 = conn.prepareStatement(sql5); pstmt5 = conn.prepareStatement(sql5);
pstmt5.setString(1,voucherNo.trim()); pstmt5.setString(1,checkNull(voucherNo).trim());
pstmt5.setString(2,suppBillId.trim()); pstmt5.setString(2,checkNull(suppBillId).trim());
pstmt5.executeUpdate(); pstmt5.executeUpdate();
pstmt5.close(); pstmt5.close();
pstmt5 = null; pstmt5 = null;
...@@ -165,7 +165,11 @@ public class MatchVoucherConfSch implements Schedule ...@@ -165,7 +165,11 @@ public class MatchVoucherConfSch implements Schedule
rcpCnt=0; rcpCnt=0;
} }
} }
} }
rs2.close();
rs2=null;
pstmt2.close();
pstmt2=null;
} }
rs1.close(); rs1.close();
rs1=null; rs1=null;
...@@ -281,6 +285,18 @@ public class MatchVoucherConfSch implements Schedule ...@@ -281,6 +285,18 @@ public class MatchVoucherConfSch implements Schedule
} }
return finalCount; return finalCount;
} }
private String checkNull(String str)
{
if(str == null)
{
return "";
}
else
{
return str ;
}
}
private int insertMismatchReason(String suppBillId, String voucherNo, String porderNo, String billNo, Date billDate, String tableName, private int insertMismatchReason(String suppBillId, String voucherNo, String porderNo, String billNo, Date billDate, String tableName,
String fieldName, Connection conn,String xtraParams, String finParam) String fieldName, Connection conn,String xtraParams, String finParam)
......
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