Commit 7edfc703 authored by wansari's avatar wansari

Changed by wasim on 11-APR-17 for reverting code for connection for updating despatch data


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105304 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fbce0957
...@@ -1127,15 +1127,15 @@ public class ConsolidatToDoc { ...@@ -1127,15 +1127,15 @@ public class ConsolidatToDoc {
//Changed by Manish on 19/04/16 [start] //Changed by Manish on 19/04/16 [start]
//Changed by wasim on 05-04-2017 for using same connection so commented [START] //Changed by wasim on 05-04-2017 for using same connection so commented [START]
//connDriver = new ConnDriver(); connDriver = new ConnDriver();
//tempConn = connDriver.getConnectDB("DriverITM"); tempConn = connDriver.getConnectDB("DriverITM");
//connDriver = null; connDriver = null;
//Changed by wasim on 05-04-2017 for using same connection so commented [END] //Changed by wasim on 05-04-2017 for using same connection so commented [END]
// errString = updatedespatch(ptcn, conn); // errString = updatedespatch(ptcn, conn);
//Changed by wasim on 05-04-2017 for using same connection //Changed by wasim on 05-04-2017 for using same connection
//errString = updatedespatch(ptcn, tempConn); errString = updatedespatch(ptcn, tempConn);
errString = updatedespatch(ptcn, conn); //errString = updatedespatch(ptcn, conn);
//Changed by Manish on 19/04/16 [end] //Changed by Manish on 19/04/16 [end]
//Changed by Dharnaj on 19-SEP-14 for [W14FSUN003] //Changed by Dharnaj on 19-SEP-14 for [W14FSUN003]
...@@ -1143,8 +1143,8 @@ public class ConsolidatToDoc { ...@@ -1143,8 +1143,8 @@ public class ConsolidatToDoc {
sqlHdr = "update despatch set gross_weight = ?, tare_weight = tare_weight + ? ,nett_weight = ?, no_art = ? where desp_id = ? "; //added by Kunal on 08/09/12 as per S Manoharan Sir instruction sqlHdr = "update despatch set gross_weight = ?, tare_weight = tare_weight + ? ,nett_weight = ?, no_art = ? where desp_id = ? "; //added by Kunal on 08/09/12 as per S Manoharan Sir instruction
// pstmtHdr = conn.prepareStatement(sqlHdr); // pstmtHdr = conn.prepareStatement(sqlHdr);
//Changed by wasim on 05-04-2017 for using same connection //Changed by wasim on 05-04-2017 for using same connection
//pstmtHdr = tempConn.prepareStatement(sqlHdr); pstmtHdr = tempConn.prepareStatement(sqlHdr);
pstmtHdr = conn.prepareStatement(sqlHdr); //pstmtHdr = conn.prepareStatement(sqlHdr);
pstmtHdr.setDouble(1, totalGrossWeight); pstmtHdr.setDouble(1, totalGrossWeight);
pstmtHdr.setDouble(2, totalTareWeight); pstmtHdr.setDouble(2, totalTareWeight);
pstmtHdr.setDouble(3, totalNetWeight); pstmtHdr.setDouble(3, totalNetWeight);
...@@ -1153,16 +1153,16 @@ public class ConsolidatToDoc { ...@@ -1153,16 +1153,16 @@ public class ConsolidatToDoc {
int upctr = pstmtHdr.executeUpdate(); int upctr = pstmtHdr.executeUpdate();
System.out.println("NO OF ROW UPDATED = "+upctr); System.out.println("NO OF ROW UPDATED = "+upctr);
//Changed by wasim on 05-04-2017 for using same connection [START] //Changed by wasim on 05-04-2017 for using same connection [START]
/*if(upctr>0) if(upctr>0)
{ {
tempConn.commit(); tempConn.commit();
} }
else else
{ {
tempConn.rollback(); tempConn.rollback();
}*/ }
//tempConn.close(); tempConn.close();
//tempConn = null; tempConn = null;
//Changed by wasim on 05-04-2017 for using same connection [END] //Changed by wasim on 05-04-2017 for using same connection [END]
pstmtHdr.close(); pstmtHdr.close();
pstmtHdr = null; pstmtHdr = null;
......
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