Package org.openqreg.db

Examples of org.openqreg.db.DbHandler.executeQuery()


public class DbHandlerTest {
    public static void main(String[] args) {
    try {
      DbHandler db = new DbHandler();
 
      ResultSet rs = db.executeQuery("select * from language");
      while (rs.next()) {       
        System.out.print(rs.getString(1));
                System.out.println(rs.getString(2));
      }
        }
View Full Code Here


      DbHandler db = createDbHandler();
     
      //Count nr of available languages
      String query     = "select ID, NAME from language";
     
      ResultSet rs     = db.executeQuery(query);
     
      int lang     = -1;
      String langName   = "";
     
      while(rs.next()) {
View Full Code Here

       
        //Loop out all diagnosegroups for this language
        Integer id = new Integer(-1);
        query = "select ID, NAME, LANGUAGE, SORTORDER from diagnose_group WHERE STATUS=1 AND LANGUAGE="+currentLanguage+" ORDER BY SORTORDER";
     
        rs = db.executeQuery(query);
       
        while(rs.next()) {
          id = new Integer(rs.getInt("ID"));
          if(debug) {
            System.out.println("Adding DiagnoseGroup: "+id+" ("+rs.getString("NAME")+")")
View Full Code Here

        }
       
        //Get all diagnoses
        query = "select DIAGNOSE.ID, DIAGNOSE.CODE, DIAGNOSE.NAME, DIAGNOSE.CODE, DIAGNOSE.LANGUAGE, DIAGNOSE.SORTORDER,DIAGNOSE_REL.DIAGNOSE_GROUP from diagnose, diagnose_rel where diagnose.ID=diagnose_rel.DIAGNOSE and diagnose.STATUS=1 and diagnose_rel.STATUS=1 AND diagnose.LANGUAGE="+currentLanguage+" ORDER BY diagnose.SORTORDER";
       
        rs = db.executeQuery(query);
       
        Integer groupId = new Integer(-1);
       
        while(rs.next()) {
          groupId = new Integer(rs.getInt("DIAGNOSE_REL.DIAGNOSE_GROUP"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.