Examples of moveNext()


Examples of org.apache.empire.db.DBReader.moveNext()

            System.out.println("Running Query:");
            System.out.println(cmd.getSelect());
            reader.open(cmd, conn);
            // Print output
            DBRecord record = new DBRecord();
            while (reader.moveNext())
            {
                // Calculate sum
                int sum = 0;
                for (int i=0; i<reader.getFieldCount(); i++)
                    sum += calcCharSum(reader.getString(i));
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

            System.out.println("Running Query:");
            System.out.println(cmd.getSelect());
            reader.open(cmd, conn);
            // Print output
            HashMap<Integer, DBRecord> employeeMap = new HashMap<Integer, DBRecord>();
            while (reader.moveNext())
            {
                DBRecord rec = new DBRecord();
                reader.initRecord(T_EMP, rec);
                employeeMap.put(reader.getInt(T_EMP.C_EMPLOYEE_ID), rec);
            }
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

                System.out.print(c.getName());
            }
            // Print output
            System.out.println("");
            // Text-Output by iterating through all records.
            while (reader.moveNext())
            {
                for (int i=0; i<count; i++)
                {   // Print all field values
                    if (i>0)
                        System.out.print("\t");
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

            if (rd.open(sysDBCommand, conn))
            {
                log.info("---------------------------------------------------------------------------------");
                log.info("checkDatabase start: " + db.getClass().getName());
                String skipTable = "";
                while (rd.moveNext())
                {
                    String tableName = rd.getString(sysDB.CI.C_TABLE_NAME);

                    // if a table wasn't found before, skip it
                    if (tableName.equals(skipTable))
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

            curDepParam.setValue(idProdDep); // set department id to production department
            // Open reader using a prepared statement (due to command parameters!)
            r.open(cmd, conn);
            // print all results
            System.out.println("Females working in the production department are:");
            while (r.moveNext())
                System.out.println("    " + r.getString(T_EMP.C_FULLNAME));
            r.close();  

            // Second query
            // Now query all males currently working in the development department
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

            curDepParam.setValue(idDevDep); // set department id to production department
            // Open reader using a prepared statement (due to command parameters!)
            r.open(cmd, conn);
            // print all results
            System.out.println("Males currently working in the development department are:");
            while (r.moveNext())
                System.out.println("    " + r.getString(T_EMP.C_FULLNAME));

        } finally {
            r.close();
        }
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

            System.out.println(cmd.getSelect());
            if (reader.open(cmd, conn) == false)
                throw new RuntimeException(reader.getErrorMessage());
            // Print output
            DBRecord record = new DBRecord();
            while (reader.moveNext())
            {
                // Calculate sum
                int sum = 0;
                for (int i=0; i<reader.getFieldCount(); i++)
                    sum += calcCharSum(reader.getString(i));
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

            System.out.println(cmd.getSelect());
            if (reader.open(cmd, conn) == false)
                throw new RuntimeException(reader.getErrorMessage());
            // Print output
            HashMap<Integer, DBRecord> employeeMap = new HashMap<Integer, DBRecord>();
            while (reader.moveNext())
            {
                DBRecord rec = new DBRecord();
                reader.initRecord(T_EMP, rec);
                employeeMap.put(reader.getInt(T_EMP.C_EMPLOYEE_ID), rec);
            }
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

                System.out.print(c.getName());
            }
            // Print output
            System.out.println("");
            // Text-Output by iterating through all records.
            while (reader.moveNext())
            {
                for (int i=0; i<count; i++)
                {   // Print all field values
                    if (i>0)
                        System.out.print("\t");
View Full Code Here

Examples of org.apache.empire.db.DBReader.moveNext()

            if (rd.open(sysDBCommand, conn))
            {
                log.info("---------------------------------------------------------------------------------");
                log.info("checkDatabase start: " + db.getClass().getName());
                String skipTable = "";
                while (rd.moveNext())
                {
                    String tableName = rd.getString(sysDB.CI.C_TABLE_NAME);

                    // if a table wasn't found before, skip it
                    if (tableName.equals(skipTable))
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.