在我的java代码中,查询结果集返回 false ,即使该查询具有数据,但是同样的查询结果集在仅包含一个java文件的示例项目中完成时返回数据。
TranSegmentQry = "SELECT TRAN_ID FROM TRAN_SEGMENT WHERE SEGMENTNAME = '"+segmentName+"'";
//segmentName getting as input ex: PRDSUM_SEG
stmt = lConnection_NEW.createStatement();
if(segmentName != null && segmentName.length()>0){
rs=stmt.executeQuery(TranSegmentQry.toString().trim());
while (rs.next()){
mLog.debug("Not even entering into this while loop"+lResultSet);
lresultMap.put("TRAN_ID", lResultSet.getString("TRAN_ID")!=null? lResultSet.getString("TRAN_ID"):"");
}}