Commit b1173f9f authored by cpatil's avatar cpatil

comment new connection while generating tran id


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93874 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 503e49b0
...@@ -1294,7 +1294,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -1294,7 +1294,7 @@ Put a validation chq amount in filter and total of details matches in case heade
System.out.println("1187---custCode----"+custCode); System.out.println("1187---custCode----"+custCode);
receiptMap = CustDetail(custCode, receiptMap,siteCode);//added by rajeshk to call method CustDetail receiptMap = CustDetail(custCode, receiptMap,siteCode);//added by rajeshk to call method CustDetail
//tranId = generateTranTd("w_receipt_adv",trDate,siteCode); //tranId = generateTranTd("w_receipt_adv",trDate,siteCode);
tranId = generateTranTd("w_receivables_jv",trDate,siteCode); tranId = generateTranTd("w_receivables_jv",trDate,siteCode,conn);
System.out.println("TranId :::::::::::::::::; "+tranId); System.out.println("TranId :::::::::::::::::; "+tranId);
writeLog(filePtr,"TranId ["+tranId+"]",true); writeLog(filePtr,"TranId ["+tranId+"]",true);
receiptMap.put("tran_id",tranId); receiptMap.put("tran_id",tranId);
...@@ -2505,10 +2505,11 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -2505,10 +2505,11 @@ Put a validation chq amount in filter and total of details matches in case heade
}//insertReceiptDtlDtl()*/ }//insertReceiptDtlDtl()*/
// ****************************** // ******************************
private String generateTranTd(String windowName,String tranDate,String siteCode)throws ITMException //private String generateTranTd(String windowName,String tranDate,String siteCode )throws ITMException
private String generateTranTd(String windowName,String tranDate,String siteCode, Connection conn )throws ITMException
{ {
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
Connection conn = null; // Connection conn = null; // commented by cpatil 14/11/13
Statement stmt = null; Statement stmt = null;
ResultSet rs = null; ResultSet rs = null;
String sql = ""; String sql = "";
...@@ -2516,7 +2517,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -2516,7 +2517,7 @@ Put a validation chq amount in filter and total of details matches in case heade
String newKeystring = ""; String newKeystring = "";
try try
{ {
conn = connDriver.getConnectDB("DriverITM"); // conn = connDriver.getConnectDB("DriverITM"); // commented by cpatil 14/11/13
sql = "SELECT KEY_STRING, TRAN_ID_COL, REF_SER FROM TRANSETUP WHERE TRAN_WINDOW = '"+windowName+"'"; sql = "SELECT KEY_STRING, TRAN_ID_COL, REF_SER FROM TRANSETUP WHERE TRAN_WINDOW = '"+windowName+"'";
stmt = conn.createStatement(); stmt = conn.createStatement();
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
...@@ -2530,6 +2531,11 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -2530,6 +2531,11 @@ Put a validation chq amount in filter and total of details matches in case heade
keyCol = rs.getString(2); keyCol = rs.getString(2);
tranSer1 = rs.getString(3); tranSer1 = rs.getString(3);
} }
rs.close();
rs = null;
stmt.close();
stmt = null;
System.out.println("keyString :"+keyString); System.out.println("keyString :"+keyString);
System.out.println("keyCol :"+keyCol); System.out.println("keyCol :"+keyCol);
System.out.println("tranSer1 :"+tranSer1); System.out.println("tranSer1 :"+tranSer1);
...@@ -2564,11 +2570,11 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -2564,11 +2570,11 @@ Put a validation chq amount in filter and total of details matches in case heade
} }
finally finally
{ {
System.out.println("Closing Connection3..."); //System.out.println("Closing Connection3...");
try try
{ {
conn.close(); // conn.close(); // commented by cpatil 14/11/13
conn = null; // conn = null; // commented by cpatil 14/11/13
} }
catch(Exception se){} catch(Exception se){}
}// }//
......
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