com.informix.jdbc

## Class IfxUpdateResultSet

- java.lang.Object
- - com.informix.jdbc.IfxUpdateResultSet

Direct Known Subclasses:
  IfxResultSet

    public class IfxUpdateResultSet
    extends java.lang.Object

### Field Summary

Fields
`protected IfxConnection` `conn`
`protected java.lang.String` `deleteCmd`
`protected java.lang.String` `insertCmd`
`protected boolean` `isForUpdateClause`
`protected boolean` `MoveToInsert`
`protected IfxResultSetMetaData` `rsmd`
`protected IfxStatement` `stmt`
`protected Trace` `trace`
`protected boolean` `updatecanceled`
`protected java.lang.String` `updateCmd`
`protected java.util.Vector<IfxObject>` `UpdateColVector`
`protected java.util.Vector<IfxObject>` `WhereVal`

### Constructor Summary

Constructors
Constructor and Description
`IfxUpdateResultSet()`

### Method Summary

Methods
`void` `cancelRowUpdates()` JDBC 2.0 The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row.
`protected void` `clearUpdateColVector()`
`void` `deleteRow()` JDBC 2.0 Delete the current row from the result set and the underlying database.
`void` `insertRow()` JDBC 2.0 Insert the contents of the insert row into the result set and the database.
`void` `moveToCurrentRow()` JDBC 2.0 Move the cursor to the remembered cursor position, usually the current row.
`void` `moveToInsertRow()` JDBC 2.0 Move to the insert row.
`void` `refreshRow()` JDBC 2.0 Refresh the value of the current row with its current value in the database.
`boolean` `rowDeleted()` JDBC 2.0 Determine if this row has been deleted.
`boolean` `rowInserted()` JDBC 2.0 Determine if the current row has been inserted.
`boolean` `rowUpdated()` JDBC 2.0 Determine if the current row has been updated.
`void` `updateArray(int columnIndex, java.sql.Array x)` JDBC 3.0 Update a column with an Array value.
`void` `updateAsciiStream(int columnIndex, java.io.InputStream x, int length)` JDBC 2.0 Update a column with an ascii stream value.
`void` `updateBigDecimal(int columnIndex, java.math.BigDecimal x)` JDBC 2.0 Update a column with a BigDecimal value.
`void` `updateBinaryStream(int columnIndex, java.io.InputStream x, int length)` JDBC 2.0 Update a column with a binary stream value.
`void` `updateBlob(int columnIndex, java.sql.Blob x)` JDBC 3.0 Update a column with a Blob value.
`void` `updateBoolean(int columnIndex, boolean x)` JDBC 2.0 Update a column with a boolean value.
`void` `updateByte(int columnIndex, byte x)` JDBC 2.0 Update a column with a byte value.
`void` `updateBytes(int columnIndex, byte[] x)` JDBC 2.0 Update a column with a byte array value.
`void` `updateCharacterStream(int columnIndex, java.io.Reader x, int length)` JDBC 2.0 Update a column with a character stream value.
`void` `updateClob(int columnIndex, java.sql.Clob x)` JDBC 3.0 Update a column with a Clob value.
`void` `updateDate(int columnIndex, java.sql.Date x)` JDBC 2.0 Update a column with a Date value.
`void` `updateDouble(int columnIndex, double x)` JDBC 2.0 Update a column with a Double value.
`void` `updateFloat(int columnIndex, float x)` JDBC 2.0 Update a column with a float value.
`void` `updateInt(int columnIndex, int x)` JDBC 2.0 Update a column with an integer value.
`void` `updateLong(int columnIndex, long x)` JDBC 2.0 Update a column with a long value.
`void` `updateNull(int columnIndex)` JDBC 2.0 Give a nullable column a null value.
`void` `updateObject(int columnIndex, java.lang.Object x)` JDBC 2.0 Update a column with an Object value.
`void` `updateObject(int columnIndex, java.lang.Object x, int scale)` JDBC 2.0 Update a column with an Object value.
`void` `updateRow()` JDBC 2.0 Update the underlying database with the new contents of the current row.
`void` `updateShort(int columnIndex, short x)` JDBC 2.0 Update a column with a short value.
`void` `updateString(int columnIndex, java.lang.String x)` JDBC 2.0 Update a column with a String value.
`void` `updateTime(int columnIndex, java.sql.Time x)` JDBC 2.0 Update a column with a Time value.
`void` `updateTimestamp(int columnIndex, java.sql.Timestamp x)` JDBC 2.0 Update a column with a Timestamp value.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### UpdateColVector

    protected java.util.Vector<IfxObject> UpdateColVector

#### trace

    protected Trace trace

#### conn

    protected IfxConnection conn

#### rsmd

    protected IfxResultSetMetaData rsmd

#### stmt

    protected IfxStatement stmt

#### WhereVal

    protected java.util.Vector<IfxObject> WhereVal

#### updateCmd

    protected java.lang.String updateCmd

#### deleteCmd

    protected java.lang.String deleteCmd

#### insertCmd

    protected java.lang.String insertCmd

#### MoveToInsert

    protected boolean MoveToInsert

#### updatecanceled

    protected boolean updatecanceled

#### isForUpdateClause

    protected boolean isForUpdateClause

### Constructor Detail

#### IfxUpdateResultSet

    public IfxUpdateResultSet()

### Method Detail

#### rowUpdated

    public boolean rowUpdated()
                       throws java.sql.SQLException

JDBC 2.0 Determine if the current row has been updated. The value returned depends on whether or not the result set can detect updates.

Returns:
  true if the row has been visibly updated by the owner or another, and updates are detected
Throws:
  `java.sql.SQLException` - if a database-access error occurs
See Also:
  `DatabaseMetaData.updatesAreDetected(int)`

#### rowInserted

    public boolean rowInserted()
                        throws java.sql.SQLException

JDBC 2.0 Determine if the current row has been inserted. The value returned depends on whether or not the result set can detect visible inserts.

Returns:
  true if inserted and inserts are detected
Throws:
  `java.sql.SQLException` - if a database-access error occurs
See Also:
  `DatabaseMetaData.insertsAreDetected(int)`

#### rowDeleted

    public boolean rowDeleted()
                       throws java.sql.SQLException

JDBC 2.0 Determine if this row has been deleted. A deleted row may leave a visible "hole" in a result set. This method can be used to detect holes in a result set. The value returned depends on whether or not the result set can detect deletions.

Returns:
  true if deleted and deletes are detected
Throws:
  `java.sql.SQLException` - if a database-access error occurs
See Also:
  `DatabaseMetaData.deletesAreDetected(int)`

#### updateNull

    public void updateNull(int columnIndex)
                    throws java.sql.SQLException

JDBC 2.0 Give a nullable column a null value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateBoolean

    public void updateBoolean(int columnIndex,
                     boolean x)
                       throws java.sql.SQLException

JDBC 2.0 Update a column with a boolean value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateByte

    public void updateByte(int columnIndex,
                  byte x)
                    throws java.sql.SQLException

JDBC 2.0 Update a column with a byte value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateShort

    public void updateShort(int columnIndex,
                   short x)
                     throws java.sql.SQLException

JDBC 2.0 Update a column with a short value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateArray

    public void updateArray(int columnIndex,
                   java.sql.Array x)
                     throws java.sql.SQLException

JDBC 3.0 Update a column with an Array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateClob

    public void updateClob(int columnIndex,
                  java.sql.Clob x)
                    throws java.sql.SQLException

JDBC 3.0 Update a column with a Clob value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateBlob

    public void updateBlob(int columnIndex,
                  java.sql.Blob x)
                    throws java.sql.SQLException

JDBC 3.0 Update a column with a Blob value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateInt

    public void updateInt(int columnIndex,
                 int x)
                   throws java.sql.SQLException

JDBC 2.0 Update a column with an integer value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateLong

    public void updateLong(int columnIndex,
                  long x)
                    throws java.sql.SQLException

JDBC 2.0 Update a column with a long value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateFloat

    public void updateFloat(int columnIndex,
                   float x)
                     throws java.sql.SQLException

JDBC 2.0 Update a column with a float value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateDouble

    public void updateDouble(int columnIndex,
                    double x)
                      throws java.sql.SQLException

JDBC 2.0 Update a column with a Double value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateBigDecimal

    public void updateBigDecimal(int columnIndex,
                        java.math.BigDecimal x)
                          throws java.sql.SQLException

JDBC 2.0 Update a column with a BigDecimal value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateString

    public void updateString(int columnIndex,
                    java.lang.String x)
                      throws java.sql.SQLException

JDBC 2.0 Update a column with a String value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateBytes

    public void updateBytes(int columnIndex,
                   byte[] x)
                     throws java.sql.SQLException

JDBC 2.0 Update a column with a byte array value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateDate

    public void updateDate(int columnIndex,
                  java.sql.Date x)
                    throws java.sql.SQLException

JDBC 2.0 Update a column with a Date value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateTime

    public void updateTime(int columnIndex,
                  java.sql.Time x)
                    throws java.sql.SQLException

JDBC 2.0 Update a column with a Time value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateTimestamp

    public void updateTimestamp(int columnIndex,
                       java.sql.Timestamp x)
                         throws java.sql.SQLException

JDBC 2.0 Update a column with a Timestamp value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateAsciiStream

    public void updateAsciiStream(int columnIndex,
                         java.io.InputStream x,
                         int length)
                           throws java.sql.SQLException

JDBC 2.0 Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
  `length` - the length of the stream
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateBinaryStream

    public void updateBinaryStream(int columnIndex,
                          java.io.InputStream x,
                          int length)
                            throws java.sql.SQLException

JDBC 2.0 Update a column with a binary stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
  `length` - the length of the stream
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateCharacterStream

    public void updateCharacterStream(int columnIndex,
                             java.io.Reader x,
                             int length)
                               throws java.sql.SQLException

JDBC 2.0 Update a column with a character stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
  `length` - the length of the stream
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateObject

    public void updateObject(int columnIndex,
                    java.lang.Object x,
                    int scale)
                      throws java.sql.SQLException

JDBC 2.0 Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
  `scale` - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### updateObject

    public void updateObject(int columnIndex,
                    java.lang.Object x)
                      throws java.sql.SQLException

JDBC 2.0 Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database.

Parameters:
  `columnIndex` - the first column is 1, the second is 2, ...
  `x` - the new column value
Throws:
  `java.sql.SQLException` - if a database-access error occurs

#### insertRow

    public void insertRow()
                   throws java.sql.SQLException

JDBC 2.0 Insert the contents of the insert row into the result set and the database. Must be on the insert row when this method is called. All insertions are done at the end of the last row according to the database specifications for Informix.

Throws:
  `java.sql.SQLException` - if a database-access error occurs, if called when not on the insert row, or if all non-nullable columns in the insert row have not been given a value

#### updateRow

    public void updateRow()
                   throws java.sql.SQLException

JDBC 2.0 Update the underlying database with the new contents of the current row. Cannot be called when on the insert row. Note that this method assumes that the row index or serial index or primary key index has already been determined. See IfxResultSet.updateRow(). Also we assume that the table name has already been determined as well.

Throws:
  `java.sql.SQLException` - if a database-access error occurs, or if called when on the insert row

#### deleteRow

    public void deleteRow()
                   throws java.sql.SQLException

JDBC 2.0 Delete the current row from the result set and the underlying database. Cannot be called when on the insert row.

Throws:
  `java.sql.SQLException` - if a database-access error occurs, or if called when on the insert row.

#### refreshRow

    public void refreshRow()
                    throws java.sql.SQLException

JDBC 2.0 Refresh the value of the current row with its current value in the database. Cannot be called when on the insert row. The refreshRow() method provides a way for an application to explicitly tell the JDBC driver to refetch a row(s) from the database. An application may want to call refreshRow() when caching or prefetching is being done by the JDBC driver to fetch the latest value of a row from the database. The JDBC driver may actually refresh multiple rows at once if the fetch size is greater than one. All values are refetched subject to the transaction isolation level and cursor sensitivity. If refreshRow() is called after calling updateXXX(), but before calling updateRow() then the updates made to the row are lost. Calling refreshRow() frequently will likely slow performance.

Throws:
  `java.sql.SQLException` - if a database-access error occurs, or if called when on the insert row.

#### cancelRowUpdates

    public void cancelRowUpdates()
                          throws java.sql.SQLException

JDBC 2.0 The cancelRowUpdates() method may be called after calling an updateXXX() method(s) and before calling updateRow() to rollback the updates made to a row. If no updates have been made or updateRow() has already been called, then this method has no effect.

Throws:
  `java.sql.SQLException` - if a database-access error occurs, or if called when on the insert row.

#### moveToInsertRow

    public void moveToInsertRow()
                         throws java.sql.SQLException

JDBC 2.0 Move to the insert row. The current cursor position is remembered while the cursor is positioned on the insert row. The insert row is a special row associated with an updatable result set. It is essentially a buffer where a new row may be constructed by calling the updateXXX() methods prior to inserting the row into the result set. Only the updateXXX(), getXXX(), and insertRow() methods may be called when the cursor is on the insert row. All of the columns in a result set must be given a value each time this method is called before calling insertRow(). UpdateXXX()must be called before getXXX() on a column.

Throws:
  `java.sql.SQLException` - if a database-access error occurs, or the result set is not updatable

#### moveToCurrentRow

    public void moveToCurrentRow()
                          throws java.sql.SQLException

JDBC 2.0 Move the cursor to the remembered cursor position, usually the current row. Has no effect unless the cursor is on the insert row.

Throws:
  `java.sql.SQLException` - if a database-access error occurs, or the result set is not updatable

#### clearUpdateColVector

    protected void clearUpdateColVector()