String sql = “select STA from ${schema}.AP_QDT_TRANS where MIDLOG = '” + paySerNo + “’”;
DataTable reqTable = DBFactory.getActionDB().executeQueryTable(sql);
//这个判断是必须的,如果没有这个if判断,下面的getString是获取不到值的
//原因应该和迭代器的玩法是一样的,next()方法使reqTable对象的指针从0前移动到了0,刚好指到了所查出的那一条记录
if (reqTable.next()) {
String STA = reqTable.getString("STA");
}