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
rs4 = pstmt4.executeQuery();
while (rs4.next())
{
voucherNo=rs4.getString("TRAN_ID");
voucherNo=checkNull(rs4.getString("TRAN_ID"));
}
rs4.close();
rs4=null;
......@@ -134,8 +134,8 @@ public class MatchVoucherConfSch implements Schedule
/**UPDATE voucherNo in table 'SUPPLIER_BILL'*/
sql5 = "UPDATE SUPPLIER_BILL set VOUCHER_NO=? WHERE TRAN_ID=?";
pstmt5 = conn.prepareStatement(sql5);
pstmt5.setString(1,voucherNo.trim());
pstmt5.setString(2,suppBillId.trim());
pstmt5.setString(1,checkNull(voucherNo).trim());
pstmt5.setString(2,checkNull(suppBillId).trim());
pstmt5.executeUpdate();
pstmt5.close();
pstmt5 = null;
......@@ -166,6 +166,10 @@ public class MatchVoucherConfSch implements Schedule
}
}
}
rs2.close();
rs2=null;
pstmt2.close();
pstmt2=null;
}
rs1.close();
rs1=null;
......@@ -280,6 +284,18 @@ public class MatchVoucherConfSch implements Schedule
finalCount=1;
}
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,
......
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