Package java.sql

Examples of java.sql.ResultSet.beforeFirst()


        rs.next();
        rs.moveToInsertRow();
        checkDetectabilityCallsOutsideRow(rs, "on insertRow");
        rs.moveToCurrentRow(); // needed until to DERBY-1322 is fixed

        rs.beforeFirst();
        checkDetectabilityCallsOutsideRow(rs, "on beforeFirst row");

        rs.afterLast();
        checkDetectabilityCallsOutsideRow(rs, "on afterLast row");
View Full Code Here


            s.executeQuery("select * from t1");
       
        rs.last();
        lastRow = rs.getRow();
       
        rs.beforeFirst();
       
        rs.next();
       
        // Test that it is possible to move to next row from insertRow
        currentPosition = rs.getRow();
View Full Code Here

        // Test that it is possible to move beforeFirst from insertRow
        currentPosition = rs.getRow();
        rs.moveToInsertRow();
        rs.updateInt(1, currentPosition + 1000);
        rs.beforeFirst();
        assertTrue("isBeforeFirst() should return true", rs.isBeforeFirst());
        rs.next();
        assertEquals("CurrentPosition should be 1", rs.getRow(), 1);
        assertTrue("isFirst() should return true", rs.isFirst());
View Full Code Here

        int numRows = 0;
        if (rs.next()) {
          //rs.last();
          //numRows=rs.getRow();
          rs.beforeFirst();
          while (rs.next()) {
            Object[] thisRow = new Object[FIELD_LAST];
            thisRow[FIELD_PERIOD_DESC] = periodDescription;
            thisRow[FIELD_ACCOUNTNUM] = new Integer(rs.getInt(1));
            thisRow[FIELD_ACCOUNTDESC] = new String(rs.getString(2));
View Full Code Here

      //count how many rows
      int numRows = 0;
      rs.last();
      numRows = rs.getRow();
      //for in the future for working dialog??
      rs.beforeFirst();
      String row;
      String typeName;
      String[] isAssetConversion = {"T", "S", "I", "K"};
      String[] labels = {"Assets", "Debts", "Incomes", "Expenses"};
      for (int i = 0; i < numRows; i++) {
View Full Code Here

      int numRows = 0;
      rs.last();
      numRows = rs.getRow();
Log.log(Log.DEBUG, this, "numRows=" + numRows );
      //for in the future for working dialog??
      rs.beforeFirst();
      String row;
      int lastProcessedTransId = -9999;
      int printActId=0;
      for (int i = 0; i < numRows; i++) {
        rs.next();
View Full Code Here

      b.write(row, 0, row.length());
      //count how many rows
      int numRows = 0;
      rs.last();
      numRows = rs.getRow();
      rs.beforeFirst();
      for (int i = 0; i < numRows; i++) {
        rs.next();
        row = "#OBJEKT 1 " + rs.getInt(1) + " \"" + rs.getString(2) + "\"\n";
        b.write(row, 0, row.length());
      }
View Full Code Here

      iNumOfRows++;
    }
    doOut.writeInt(iNumOfRows);

    //save each row
    rs.beforeFirst();
    //position before the first record
    int j = 0;
    while (rs.next()) {
      for (int i = 1; i <= rsmd.getColumnCount(); i++) {
        switch (rsmd.getColumnType(i)) {
View Full Code Here

        ResultSet rs = st.executeQuery(dc.filterSQL(select));
        numRows = 0;
        while (rs.next()) {
          numRows++;
        }
        rs.beforeFirst();
        allAccountNames = new String[numRows];
        allAccountNums = new Integer[numRows];
        allAccountSel = new Boolean[numRows];
        allAccountInvert = new Boolean[numRows];
        allAccountGroups = new String[numRows];
View Full Code Here

        //count how many rows
        int numRows = 0;
        rs.last();
        numRows = rs.getRow();
        //for in the future for working dialog??
        rs.beforeFirst();
        String row;
        for (int i = 0; i < numRows; i++) {
          rs.next();
          Object[] newRow = new Object[NUMBER_OF_INTERAL_FIELDS];
          newRow[INFIELD_IS_IN_BALANCE] = new Integer(rs.getInt(4));
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.