Package javax.sql.rowset

Examples of javax.sql.rowset.CachedRowSet.updateString()


        crset.absolute(3);

        CachedRowSet crsetCopy = crset.createCopy();

        crsetCopy.updateString(2, "copyTest3");
        crsetCopy.updateRow();
        crsetCopy.acceptChanges();

        assertEquals("copyTest3", crsetCopy.getString(2));
View Full Code Here


        CachedRowSet copy = crset.createCopy();

        copy.absolute(3);
        crset.absolute(3);

        copy.updateString(2, "updated");
        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));
        copy.updateRow();
        copy.acceptChanges();
View Full Code Here

        assertEquals(3, crset.getInt(1));
        assertEquals("test3", crset.getString(2));
        assertEquals(3, crsetShared.getInt(1));
        assertEquals("test3", crsetShared.getString(2));
        // check whether update the duplicate is visible to the original
        crsetShared.updateString(2, "modify3");
        assertEquals("modify3", crsetShared.getString(2));
        assertEquals("modify3", crset.getString(2));
        crsetShared.updateRow();
        listener.clear();
        crsetShared.acceptChanges();
View Full Code Here

        // call toCrset.acceptChanges()
        assertTrue(toCrset.absolute(3));
        assertEquals("test3", toCrset.getString(2));
        assertTrue(toCrset.last());
        assertEquals("test4", toCrset.getString(2));
        toCrset.updateString(2, "update4");
        toCrset.updateRow();
        toCrset.acceptChanges();
        assertTrue(toCrset.absolute(4));
        assertEquals("update4", toCrset.getString(2));
View Full Code Here

            assertTrue(toCrset.last());
        } else {
            assertTrue(toCrset.first());
        }
        assertEquals(4, toCrset.getInt(1));
        toCrset.updateString(2, "modify4");
        toCrset.updateRow();
        try {
            toCrset.acceptChanges();
            fail("should throw exception");
        } catch (Exception e) {
View Full Code Here

        CachedRowSet copy = crset.createCopy();

        copy.absolute(3);
        crset.absolute(3);

        copy.updateString(2, "updated");
        assertEquals("updated", copy.getString(2));
        assertEquals("test3", crset.getString(2));

        copy.updateRow();
        copy.acceptChanges();
View Full Code Here

            }
        }
        assertEquals(1, count);

        crset2.first();
        crset2.updateString(2, "Updated2");

    }

    public void testJoin_Delete() throws Exception {
        rs = st.executeQuery("select * from BOOKS");
View Full Code Here

      } else {
        // AD:20/11/2008: Allow for CachedRowSet to be updated if the DBDataSet has already been populated.
        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            cachedRowSet.updateString(pColOrdinal, pValue);
          } catch (SQLException e) {
            UsageException errorVar = new UsageException(e.getMessage(), net.helipilot50.stocktrade.framework.Constants.SP_ER_USER, net.helipilot50.stocktrade.framework.Constants.SP_ER_PARAMETERERROR, e);
            ErrorMgr.addError(errorVar);
            throw errorVar;
          }
View Full Code Here

        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            if (pValue instanceof TextData) {
              TextData textValue = (TextData) pValue;
              cachedRowSet.updateString(pColOrdinal, textValue.toString());
            } else if (pValue instanceof IntegerData) {
              IntegerData integerValue = (IntegerData) pValue;
              cachedRowSet.updateInt(pColOrdinal, integerValue.getIntegerValue());
            } else if (pValue instanceof DoubleData) {
              DoubleData doubleValue = (DoubleData) pValue;
View Full Code Here

        if (resultSet instanceof CachedRowSet) {
          CachedRowSet cachedRowSet = (CachedRowSet) resultSet;
          try {
            if (pValue instanceof TextData) {
              TextData textValue = (TextData) pValue;
              cachedRowSet.updateString(pColOrdinal, textValue.toString());
            } else if (pValue instanceof IntegerData) {
              IntegerData integerValue = (IntegerData) pValue;
              cachedRowSet.updateInt(pColOrdinal, integerValue.getIntegerValue());
            } else if (pValue instanceof DoubleData) {
              DoubleData doubleValue = (DoubleData) pValue;
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.