PreparedStatement ResultSet

PreparedStatement  ResultSet
public int searchProblemDistinctCount() throws Exception {
        DBOperator dbo = getDBOperator();
        try {
            PatientproblemTableAdapter adapter = new PatientproblemTableAdapter(dbo);
            PreparedStatement st = dbo.prepareStatement("select distinct patientid from "
                    + adapter.getSchemaName() + "."
                    + adapter.getTableName() + " where status=‘active‘ and (deletedflag <> ‘1‘ or deletedflag is null)");
            ResultSet rs =st.executeQuery();
            int count=0;
            while(rs.next())
            {
                count++;
            }
            return count;
        } catch (Exception e) {
            dbo.rollback();
            throw e;
        } finally {
            dbo.close();
        }
    }
PreparedStatement  ResultSet

PreparedStatement ResultSet

上一篇:java 生成GUID


下一篇:vue axios配置