hi am also getting the same error for this below code, can some pls help me
try {
//get the connection
conn = CommonUtil.getConnection();
psSupp = new StringStatement(conn, strTP);
psSupp.setString(1,strITTCode);
psSupp.setString(2,strResponseNo);
Log.out.debug(psSupp.toString());
rsSupp = psSupp.executeQuery();
if (rsSupp.next()) {
udSupplierBriefInfo.setStrSupplierType("0");
udSupplierBriefInfo.setStrSupplierCode(rsSupp.getString("SUPP_CODE"));
udSupplierBriefInfo.setStrSupplierSiteId(rsSupp.getString("SUPP_SITE_ID"));
udSupplierBriefInfo.setStrSupplierName(rsSupp.getString("SUPP_NAME"));
udSupplierBriefInfo.setIntResponseNo(Integer.parseInt(strResponseNo));
if (rsSupp != null) rsSupp.close();
rsSupp = null;
if (psSupp != null) psSupp.close();
psSupp = null;
if (conn != null && !conn.isClosed()) conn.close();
}
else {
conn = CommonUtil.getConnection();
psSupp = new StringStatement(conn, strNonTP);
psSupp.setString(1,strITTCode);
psSupp.setString(2,strResponseNo);
Log.out.debug("Not a TP that is logically undeleted -> Next querry :" +psSupp.toString());
rsSupp = psSupp.executeQuery();
if (rsSupp.next()) {
udSupplierBriefInfo.setStrSupplierType("1");
udSupplierBriefInfo.setStrSupplierCode(rsSupp.getString("SUPP_CODE"));
udSupplierBriefInfo.setStrSupplierSiteId(rsSupp.getString("SUPP_SITE_ID"));
udSupplierBriefInfo.setStrSupplierName(rsSupp.getString("SUPP_NAME"));
udSupplierBriefInfo.setIntResponseNo(Integer.parseInt(strResponseNo));
if (rsSupp != null) rsSupp.close();
rsSupp = null;
if (psSupp != null) psSupp.close();
psSupp = null;
if (conn != null && !conn.isClosed()) conn.close();
}
/*else {
psSupp = new StringStatement(conn, strNonTPDeleted);
psSupp.setString(1,strITTCode);
psSupp.setString(2,strResponseNo);
Log.out.debug("Not a TP or Non-TP that are logically undeleted -> Next querry :" +psSupp.toString());
rsSupp = psSupp.executeQuery();
if (rsSupp.next()) {
udSupplierBriefInfo.setStrSupplierType("1");
udSupplierBriefInfo.setStrSupplierCode(rsSupp.getString("SUPP_CODE"));
udSupplierBriefInfo.setStrSupplierSiteId(rsSupp.getString("SUPP_SITE_ID"));
udSupplierBriefInfo.setStrSupplierName(rsSupp.getString("SUPP_NAME"));
udSupplierBriefInfo.setIntResponseNo(Integer.parseInt(strResponseNo));
}*/
else {
conn = CommonUtil.getConnection();
psSupp = new StringStatement(conn, strTPDeleted);
psSupp.setString(1,strITTCode);
psSupp.setString(2,strResponseNo);
Log.out.debug("Not a TP that is logically undeleted or Non-TP -> Next querry :" +psSupp.toString());
rsSupp = psSupp.executeQuery();
if (rsSupp.next()) {
udSupplierBriefInfo.setStrSupplierType("0");
udSupplierBriefInfo.setStrSupplierCode(rsSupp.getString("SUPP_CODE"));
udSupplierBriefInfo.setStrSupplierSiteId(rsSupp.getString("SUPP_SITE_ID"));
udSupplierBriefInfo.setStrSupplierName(rsSupp.getString("SUPP_NAME"));
udSupplierBriefInfo.setIntResponseNo(Integer.parseInt(strResponseNo));
}
if (rsSupp != null) rsSupp.close();
rsSupp = null;
if (psSupp != null) psSupp.close();
psSupp = null;
if (conn != null && !conn.isClosed()) conn.close();
}
}
if (rsSupp != null) rsSupp.close();
rsSupp = null;
if (psSupp != null) psSupp.close();
psSupp = null;
}// end try
catch(Exception ex) {
ex.printStackTrace();
Log.out.error("Exception in method loadSupplierBriefInfo() in AwardDAO : "+ ex);
throw new WebittException("LAD007","Could not get Supplier Brief Info", ex);
}
finally {
try {
if (rsSupp != null) rsSupp.close();
if (psSupp != null) psSupp.close();
if (conn != null && !conn.isClosed()) conn.close();
}
catch(Exception fex) {
Log.out.error("Exception in method loadSupplierBriefInfo() finally block in AwardDAO : "+ fex.getMessage());
}
}