日期:2014-05-17 浏览次数:21176 次
public ArrayList getMMSSingleContent(String foreignid) {
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
ArrayList<String> content = new ArrayList<String>();
try {
conn = IF_DBPool.getConnection();
if("".equals(conn)||conn==null){
log.info("conn is null!!");
}
log.info("SQL:"+DBStatement.SEND_TASK_SELECT_TBL_MMSINGLESENDContent);
stmt = conn.prepareStatement(DBStatement.SEND_TASK_SELECT_TBL_MMSINGLESENDContent);
if("".equals(stmt)||stmt==null){
log.info("stmt is null!!");
}
stmt.setString(1, foreignid);
log.info("SQL语句:select * from tbl_MMSingleSendCONTENT mms where foreignid ='"+ foreignid + "' order by foreignID,sequence");
rs = stmt.executeQuery();
log.info("executeQuery end!!");
while (rs.next()) {
log.info("MMSCONTENT:"+rs.getString("MMSCONTENT"));
content.add(rs.getString("MMSCONTENT"));
}
log.info("SQL end!");
} catch (Exception ex) {
log.error("fetch mmssinglecontent error:" + ex.getMessage(), ex);
} finally {
if (conn != null) {
try {
log.info("close begin!");
conn.close();
log.info("close end!");
} catch (SQLException e) {
log.error("C09 err:" + e.getMessage(), e);
}
}
}
return content;
}