Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*
    * $Id: AbstractResultSet.java 57878 2013-03-30 15:14:44Z mrotteveel $
    * 
    * Firebird Open Source J2ee connector - jdbc driver
    *
    * Distributable under LGPL license.
    * You may obtain a copy of the License at http://www.gnu.org/copyleft/lgpl.html
    *
    * This program is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * LGPL License for more details.
   *
   * This file was created by members of the firebird development team.
   * All individual contributions remain the Copyright (C) of those
   * individuals.  Contributors to this file are either listed here or
   * can be obtained from a CVS history command.
   *
   * All rights reserved.
   */
  package org.firebirdsql.jdbc;
  
  import java.io.*;
  import java.math.*;
  import java.net.*;
  import java.sql.*;
  import java.sql.Date;
  import java.util.*;
  
Implementation of java.sql.ResultSet interface.

Author(s):
David Jencks
Roman Rokytskyy
Mark Rotteveel
  
  
      private AbstractStatement fbStatement;
      private FBFetcher fbFetcher;
      private FirebirdRowUpdater rowUpdater;
  
      protected GDSHelper gdsHelper;
  
      protected XSQLVAR[] xsqlvars;
  
      protected byte[][] row;
  
      private int maxRows = 0;
       
      private boolean wasNull = false;
      private boolean wasNullValid = false;
      // closed is false until the close method is invoked;
      private volatile boolean closed = false;
  
      //might be a bit of a kludge, or a useful feature.
      private boolean trimStrings;
  
      private SQLWarning firstWarning = null;
       
      private FBField[] fields = null;
      private java.util.HashMap colNames = new java.util.HashMap();
      
      private String cursorName;
      
      private int rsType = .;
      private int rsConcurrency = .;
      private int rsHoldability = .;
      
      /* (non-Javadoc)
       * @see org.firebirdsql.jdbc.FBObjectListener.FetcherListener#allRowsFetched(org.firebirdsql.jdbc.FBFetcher)
       */
      public void allRowsFetched(FBFetcher fetcherthrows SQLException {
          // notify our listener that all rows were fetched.
          .allRowsFetched(this);
      }
      
      /* (non-Javadoc)
       * @see org.firebirdsql.jdbc.FBObjectListener.FetcherListener#fetcherClosed(org.firebirdsql.jdbc.FBFetcher)
       */
      public void fetcherClosed(FBFetcher fetcherthrows SQLException {
          // ignore, there nothing to do here
      }
      
      /* (non-Javadoc)
       * @see org.firebirdsql.jdbc.FBObjectListener.FetcherListener#rowChanged(org.firebirdsql.jdbc.FBFetcher, byte[][])
       */
      public void rowChanged(FBFetcher fetcherbyte[][] newRowthrows SQLException {
          this. = newRow;
      }
    
Creates a new FBResultSet instance.

Parameters:
gdsHelper a AbstractConnection value
fbStatement a AbstractStatement value
stmt an isc_stmt_handle value
 
     protected AbstractResultSet(GDSHelper gdsHelper
                           AbstractStatement fbStatement
                           AbstractIscStmtHandle stmt
                           FBObjectListener.ResultSetListener listener,
                           boolean metaDataQuery
                           int rsType
                           int rsConcurrency,
                           int rsHoldability,
                           boolean cached
     throws SQLException {
         
         this. = gdsHelper;
         this. = fbStatement.getCursorName();
         
         this. = listener;
         
         this. = rsType;
         this. = rsConcurrency;
         this. = rsHoldability;
         
         this. = metaDataQuery;
         
         this. = stmt.getOutSqlda().;
         this. = fbStatement.getMaxRows();
         
         this. = fbStatement;
         
         boolean updatableCursor = fbStatement.isUpdatableCursor();
 
         if (rsType != . || metaDataQuery)
             cached = true;
         
         if (cached) {
             prepareVars(true);
              = new FBCachedFetcher(gdsHelper,
                     fbStatement.fetchSizefbStatement.maxRowsstmtthis,
                     rsType == .);
         } else {
             prepareVars(false);
             
             if (rsType == .) {
                 fbStatement.addWarning(new FBSQLWarning(
                     "Result set type changed. " 
                     + "ResultSet.TYPE_SCROLL_SENSITIVE is not supported."));
                     
                 rsType = .;
             }
             
             if (updatableCursor)  
                  = new FBUpdatableCursorFetcher(gdsHelper,
                         fbStatementstmtthisfbStatement.getMaxRows(),
                         fbStatement.getFetchSize());
             else
                  = new FBStatementFetcher(gdsHelper,
                         fbStatementstmtthisfbStatement.getMaxRows(),
                         fbStatement.getFetchSize());
         }
         
         if (rsConcurrency == .) {
             try {
                  = new FBRowUpdater(gdsHelperthiscachedlistener);
             } catch (FBResultSetNotUpdatableException ex) {
                 fbStatement.addWarning(new FBSQLWarning(
                     "Result set concurrency changed to READ ONLY."));
 
                 rsConcurrency = .;
             }
         }
     }
 
     protected AbstractResultSet(XSQLVAR[] xsqlvarsArrayList rowsthrows SQLException {
          = 0;
          = new FBCachedFetcher(rows,this);
         this. = xsqlvars;
         prepareVars(true);
     }
     
     private void prepareVars(boolean cachedthrows SQLException {
          = new FBField[.];
          = new HashMap(.,1);
         for (int i=0; i<.i++){
             final int fieldPosition = i;
             
               // anonymous implementation of the FieldDataProvider interface
               FieldDataProvider dataProvider = new FieldDataProvider() {
                   public byte[] getFieldData() {
                       return [fieldPosition];
                   }
                   
                   public void setFieldData(byte[] data) {
                       [fieldPosition] = data;
                   }
               };
               
             [i] = FBField.createField([i], dataProvidercached);
         }
     }
    
    
Notify the row updater about the new row that was fetched. This method must be called after each change in cursor position.
 
     private void notifyRowUpdater() throws SQLException {
         if ( != null)
             .setRow();
     }

    
Check if statement is open and prepare statement for cursor move.

Throws:
java.sql.SQLException if statement is closed.
 
     protected void checkCursorMove() throws SQLException {
         if (isClosed()) 
             throw new FBSQLException("The result set is closed");
         
         closeFields();
     }
    
    
Close the fields if they were open (applies mainly to the stream fields).

Throws:
java.sql.SQLException if something wrong happened.
 
     protected void closeFields() throws SQLException {
          = false;
 
         // close current fields, so that resources are freed.
         for(int i = 0; i < .i++) {
         	try {
         	    [i].close();
         	} catch (SQLException ex) {
         		chain.append(ex);
         	}
         }
         
         if (chain.hasException()) {
         	throw chain.getException();
         }
     }
     
     /* (non-Javadoc)
      * @see org.firebirdsql.jdbc.Synchronizable#getSynchronizationObject()
      */
     public Object getSynchronizationObject() throws SQLException {
         return .getSynchronizationObject();
     }
    
    
Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

If an input stream is open for the current row, a call to the method next will implicitly close it. A ResultSet object's warning chain is cleared when a new row is read.

Returns:
true if the new current row is valid; false if there are no more rows
Throws:
java.sql.SQLException if a database access error occurs
 
     public boolean next() throws  SQLException {
         checkCursorMove();
         boolean result = .next();
         
         if (result)
             notifyRowUpdater();
         
         return result;
     }

    
Releases this ResultSet object's database and JDBC resources immediately instead of waiting for this to happen when it is automatically closed.

Note: A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet object is also automatically closed when it is garbage collected.

Throws:
java.sql.SQLException if a database access error occurs
 
     public void close() throws  SQLException {
         close(true);
     }
     
     public boolean isClosed() throws SQLException {
         return ;
     }
     
     void close(boolean notifyListenerthrows SQLException {
     	if (isClosed()) return;
     	 = true;
     	
         try {
             closeFields();
         } catch (SQLException ex) {
         	chain.append(ex);
         } finally {
         	try {
         		if ( != null) {
         			try {
         			    .close();
         			} catch (SQLException ex) {
         				chain.append(ex);
         			}
         		}
 
                 if ( != null) {
                 	try {
                 	    .close();
                 	} catch (SQLException ex) {
                 		chain.append(ex);
                 	}
                 }
 
                 if (notifyListener &&  != null) {
                 	try {
                 	    .resultSetClosed(this);
                 	} catch (SQLException ex) {
                 		chain.append(ex);
                 	}
                 }
         	} finally {
         	     = null;
         	     = null;
         	}
         }
 
         if (chain.hasException()) {
             throw chain.getException();
         }
     }

    
Reports whether the last column read had a value of SQL NULL. Note that you must first call one of the getXXX methods on a column to try to read its value and then call the method wasNull to see if the value read was SQL NULL.

Returns:
true if the last column value read was SQL NULL and false otherwise
Throws:
java.sql.SQLException if a database access error occurs
 
     public boolean wasNull() throws  SQLException {
         if (!) {
             throw new FBSQLException("Look at a column before testing null.");
         }
         if ( == null) {
             throw new FBSQLException("No row available for wasNull.");
         }
         return ;		  
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a stream of ASCII characters. The value can then be read in chunks from the stream. This method is particularly suitable for retrieving large LONGVARCHAR values.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
a stream of ascii characters
Throws:
java.sql.SQLException if this parameter cannot be retrieved as an ASCII stream
 
     public InputStream getAsciiStream(int columnIndexthrows SQLException {
         return getField(columnIndex).getAsciiStream();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a BigDecimal object.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The value of the field as a BigDecimal
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a BigDecimal
 
     public BigDecimal getBigDecimal(int columnIndexthrows SQLException {
         return getField(columnIndex).getBigDecimal();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a binary InputStream.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The value of the field as a binary input stream
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a binary InputStream
 
     public InputStream getBinaryStream(int columnIndexthrows SQLException {
         return getField(columnIndex).getBinaryStream();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a Blob object.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The value of the field as a Blob object
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a Blob
 
     public Blob getBlob(int columnIndexthrows SQLException {
         return getField(columnIndex).getBlob();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a boolean value.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The boolean value of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a boolean
 
     public boolean getBoolean(int columnIndexthrows SQLException {
         return getField(columnIndex).getBoolean();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a byte value.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The byte value of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a byte
 
     public byte getByte(int columnIndexthrows SQLException {
         return getField(columnIndex).getByte();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a byte array.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The byte array value of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a byte array
 
     public byte[] getBytes(int columnIndexthrows SQLException {
         return getField(columnIndex).getBytes();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a Date object.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The Date object of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a Date object
 
     public Date getDate(int columnIndexthrows SQLException {
         return getField(columnIndex).getDate();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a double value.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The double value of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a double
 
     public double getDouble(int columnIndexthrows SQLException {
         return getField(columnIndex).getDouble();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a float value.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The float value of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a float
 
     public float getFloat(int columnIndexthrows SQLException {
         return getField(columnIndex).getFloat();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as an int value.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The int value of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as an int
 
     public int getInt(int columnIndexthrows SQLException {
         return getField(columnIndex).getInt();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a long value.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The long value of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a long
 
     public long getLong(int columnIndexthrows SQLException {
         return getField(columnIndex).getLong();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as an Object.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The Object representation of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as an Object
 
     public Object getObject(int columnIndexthrows SQLException {
         return getField(columnIndex).getObject();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a short value.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The short value of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a short
 
     public short getShort(int columnIndexthrows SQLException {
         return getField(columnIndex).getShort();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a String object.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The String representation of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a String
 
     public String getString(int columnIndexthrows SQLException {
         if () {
             String result = getField(columnIndex).getString();
             return result != null ? result.trim() : null;
         } else
             return getField(columnIndex).getString();
     }
     
     public String getNString(int columnIndexthrows SQLException {
         throw new FBDriverNotCapableException();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a Time object.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The Time representation of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a Time object
 
     public Time getTime(int columnIndexthrows SQLException {
         return getField(columnIndex).getTime();
     }

    
Retrieve the value of the designated column in the current row of this ResultSet as a Timestamp object.

Parameters:
columnIndex The index of the parameter to retrieve, first parameter is 1, second is 2, ...
Returns:
The Timestamp representation of the field
Throws:
java.sql.SQLException if this paramater cannot be retrieved as a Timestamp object
 
     public Timestamp getTimestamp(int columnIndexthrows SQLException {
         return getField(columnIndex).getTimestamp();
     }

    

Deprecated:
 
     public InputStream getUnicodeStream(int columnIndexthrows SQLException {
         return getField(columnIndex).getUnicodeStream();
     }
     
     public Reader getNCharacterStream(int columnIndexthrows SQLException {
         throw new FBDriverNotCapableException();
     }
    
    
Returns the XSQLVAR structure for the specified column.
 
     protected XSQLVAR getXsqlvar(int columnIndex) {
         return [columnIndex - 1];
     }

    
Get the FBField object at the given column index

Parameters:
columnIndex The index of the parameter, 1 is the first index
Throws:
java.sql.SQLException If there is an error accessing the field
 
     public FBField getField(int columnIndexthrows SQLException {
         FBField field = getField(columnIndextrue);
 
          = true;
         // wasNull = field.isNull();
         if ( != null)
              = ([columnIndex - 1] == null);
         else
              = true;
         
         return field;
     }
    
    
Factory method for the field access objects
 
     public FBField getField(int columnIndexboolean checkRowPositionthrows SQLException {
         if (isClosed()) 
             throw new FBSQLException("The resultSet is closed");
         
         if (checkRowPosition &&  == null &&  == null)
             throw new FBSQLException(
                     "The resultSet is not in a row, use next",
                     .);
         
         if (columnIndex > .)
              throw new FBSQLException(
                     "Invalid column index.",
                     .);
         
         if ( != null)
             return .getField(columnIndex - 1);
         else
             return [columnIndex-1];
     }

    
Get a FBField by name.

Parameters:
columnName The name of the field to be retrieved
Throws:
java.sql.SQLException if the field cannot be retrieved
 
     public FBField getField(String columnNamethrows SQLException {
         if (isClosed()) 
             throw new FBSQLException("The resultSet is closed");
         
         if ( == null &&  == null)
             throw new FBSQLException(
                     "The resultSet is not in a row, use next",
                     .);
 
         if (columnName == null) {
             throw new FBSQLException(
                     "Column identifier must be not null.",
                     .);
         }
 
         Integer fieldNum = (Integer.get(columnName);
         // If it is the first time the columnName is used
         if (fieldNum == null){
             int colNum = findColumn(columnName);
             fieldNum = new Integer(colNum);
             .put(columnNamefieldNum);
         }
         int colNum = fieldNum.intValue();
         FBField field =  != null ? .getField(colNum - 1)
                 : [colNum - 1];
          = true;
          = ( != null ? [colNum - 1] == null : true);
         return field;
     }
    
    
Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal in the Java programming language.

Deprecated:
Parameters:
columnIndex the first column is 1, the second is 2, ...
scale the number of digits to the right of the decimal point
Returns:
the column value; if the value is SQL NULL, the value returned is null
Throws:
java.sql.SQLException if a database access error occurs
 
     public BigDecimal getBigDecimal(int columnIndexint scalethrows  SQLException {
         return getField(columnIndex).getBigDecimal(scale);
     }
 
     //======================================================================
     // Methods for accessing results by column name
     //======================================================================
 
    
Retrieves the value of the designated column in the current row of this ResultSet object as a String.

Parameters:
columnName The SQL name of the column
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public String getString(String columnNamethrows  SQLException {
         if () {
             String result = getField(columnName).getString();
             return result != null ? result.trim() : null;
         } else
             return getField(columnName).getString();
     }
     
     public String getNString(String columnLabelthrows SQLException {
         throw new FBDriverNotCapableException();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a boolean value.

Parameters:
columnName The SQL name of the column
Returns:
The String value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public boolean getBoolean(String columnNamethrows  SQLException {
         return getField(columnName).getBoolean();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a byte value.

Parameters:
columnName The SQL name of the column
Returns:
The byte value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public byte getByte(String columnNamethrows  SQLException {
         return getField(columnName).getByte();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a short value.

Parameters:
columnName The SQL name of the column
Returns:
THe short value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public short getShort(String columnNamethrows  SQLException {
         return getField(columnName).getShort();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as an int value.

Parameters:
columnName The SQL name of the column
Returns:
The int value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public int getInt(String columnNamethrows  SQLException {
         return getField(columnName).getInt();
     }


    
Retrieves the value of the designated column in the current row of this ResultSet object as a long value.

Parameters:
columnName The SQL name of the column
Returns:
The long value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public long getLong(String columnNamethrows  SQLException {
         return getField(columnName).getLong();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a float value.

Parameters:
columnName The SQL name of the column
Returns:
The float value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public float getFloat(String columnNamethrows  SQLException {
         return getField(columnName).getFloat();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a double value.

Parameters:
columnName The SQL name of the column
Returns:
The double value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public double getDouble(String columnNamethrows  SQLException {
         return getField(columnName).getDouble();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a BigDecimal.

Deprecated:
Parameters:
columnName The SQL name of the column
Returns:
The BigDecimal value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public BigDecimal getBigDecimal(String columnNameint scalethrows  SQLException {
         return getField(columnName).getBigDecimal(scale);
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a byte array.

Parameters:
columnName The SQL name of the column
Returns:
The byte array value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public byte[] getBytes(String columnNamethrows  SQLException {
         return getField(columnName).getBytes();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a Date.

Parameters:
columnName The SQL name of the column
Returns:
The Date value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public Date getDate(String columnNamethrows  SQLException {
         return getField(columnName).getDate();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a Time object.

Parameters:
columnName The SQL name of the column
Returns:
The Time value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public Time getTime(String columnNamethrows  SQLException {
         return getField(columnName).getTime();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a Timestamp object.

Parameters:
columnName The SQL name of the column
Returns:
The Timestamp value
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public Timestamp getTimestamp(String columnNamethrows  SQLException {
         return getField(columnName).getTimestamp();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as an InputStream.

Parameters:
columnName The SQL name of the column
Returns:
The value as an InputStream
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public InputStream getAsciiStream(String columnNamethrows  SQLException {
         return getField(columnName).getAsciiStream();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a unicode InputStream.

Deprecated:
Parameters:
columnName The SQL name of the column
Returns:
The value as a unicode InputStream
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public InputStream getUnicodeStream(String columnNamethrows  SQLException {
         return getField(columnName).getUnicodeStream();
     }
     
     public Reader getNCharacterStream(String columnLabelthrows SQLException {
         throw new FBDriverNotCapableException();
     }

    
Retrieves the value of the designated column in the current row of this ResultSet object as a binary InputStream.

Parameters:
columnName The SQL name of the column
Returns:
The value as a binary InputStream
Throws:
java.sql.SQLException if the given column cannot be retrieved
 
     public InputStream getBinaryStream(String columnNamethrows  SQLException {
         return getField(columnName).getBinaryStream();
     }
 
     //=====================================================================
     // Advanced features:
     //=====================================================================
 
    
Returns the first warning reported by calls on this ResultSet object. Subsequent warnings on this ResultSet object will be chained to the SQLWarning object that this method returns.

The warning chain is automatically cleared each time a new row is read.

Note: This warning chain only covers warnings caused by ResultSet methods. Any warning caused by Statement methods (such as reading OUT parameters) will be chained on the Statement object.

Returns:
the first SQLWarning object reported or null
Throws:
java.sql.SQLException if a database access error occurs
 
     public SQLWarning getWarnings() throws  SQLException {
        return ;
     }

    
Clears all warnings reported on this ResultSet object. After this method is called, the method getWarnings returns null until a new warning is reported for this ResultSet object.

Throws:
java.sql.SQLException if a database access error occurs
 
     public void clearWarnings() throws  SQLException {
         = null;
     }

    
Gets the name of the SQL cursor used by this ResultSet object.

In SQL, a result table is retrieved through a cursor that is named. The current row of a result set can be updated or deleted using a positioned update/delete statement that references the cursor name. To insure that the cursor has the proper isolation level to support update, the cursor's select statement should be of the form 'select for update'. If the 'for update' clause is omitted, the positioned updates may fail.

The JDBC API supports this SQL feature by providing the name of the SQL cursor used by a ResultSet object. The current row of a ResultSet object is also the current row of this SQL cursor.

Note: If positioned update is not supported, a SQLException is thrown.

Returns:
the SQL name for this ResultSet object's cursor
Throws:
java.sql.SQLException if a database access error occurs
    public String getCursorName() throws  SQLException {
        return ;
    }

    
Retrieves the number, types and properties of this ResultSet object's columns.

Returns:
the description of this ResultSet object's columns
Throws:
java.sql.SQLException if a database access error occurs TODO we need another way of specifying the exended metadata if this result set is constructed in code.
    public ResultSetMetaData getMetaData() throws  SQLException {
        return new FBResultSetMetaData();
    }

    

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification.

This method may also be used to read datatabase-specific abstract data types. In the JDBC 2.0 API, the behavior of the method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Parameters:
columnName the SQL name of the column
Returns:
a java.lang.Object holding the column value
Throws:
java.sql.SQLException if a database access error occurs
    public Object getObject(String columnNamethrows  SQLException {
        return getField(columnName).getObject();
    }
    //----------------------------------------------------------------

    
Maps the given ResultSet column name to its ResultSet column index.

Parameters:
columnName the name of the column
Returns:
the column index of the given column name
Throws:
java.sql.SQLException if a database access error occurs
    // See section 14.2.3 of jdbc-3.0 specification
    // "Column names supplied to getter methods are case insensitive
    // If a select list contains the same column more than once, 
    // the first instance of the column will be returned
    public int findColumn(String columnNamethrows SQLException {
        if (columnName == null || columnName.equals("")) {
            throw new FBSQLException(
                    "Empty string does not identify column.",
                    .);
        }
        if (columnName.startsWith("\"") && columnName.endsWith("\"")) {
            columnName = columnName.substring(1, columnName.length() - 1);				
            // case-sensitively check column aliases 
            for (int i = 0; i.i++) {
                if (columnName.equals([i].)) {
                    return ++i;
                }
            }
            // case-sensitively check column names
            for (int i = 0; i.i++) {
                if (columnName.equals([i].)) {
                    return ++i;
                }
            } 
        }
		  else {
            for (int i = 0; i.i++) {
                if (columnName.equalsIgnoreCase([i].)) {
                    return ++i;
                }
            }
            for (int i = 0; i.i++) {
                if (columnName.equalsIgnoreCase([i].)) {
                    return ++i;
                }
            }
        }        
        throw new FBSQLException(
                "Column name " + columnName + " not found in result set.",
                .); 
    }
    //--------------------------JDBC 2.0-----------------------------------
    //---------------------------------------------------------------------
    // Getters and Setters
    //---------------------------------------------------------------------

    
Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.

Parameters:
columnIndex the first column is 1, the second is 2, ...
Returns:
a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public Reader getCharacterStream(int columnIndexthrows  SQLException {
        return getField(columnIndex).getCharacterStream();
    }

    
Gets the value of the designated column in the current row of this ResultSet object as a java.io.Reader object.

Parameters:
columnName the name of the column
Returns:
a java.io.Reader object that contains the column value; if the value is SQL NULL, the value returned is null in the Java programming language.
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public Reader getCharacterStream(String columnNamethrows  SQLException {
        return getField(columnName).getCharacterStream();
    }

    
Gets the value of the designated column in the current row of this ResultSet object as a java.math.BigDecimal with full precision.

Parameters:
columnName the column name
Returns:
the column value (full precision); if the value is SQL NULL, the value returned is null in the Java programming language.
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public BigDecimal getBigDecimal(String columnNamethrows  SQLException {
        return getField(columnName).getBigDecimal();
    }
    //---------------------------------------------------------------------
    // Traversal/Positioning
    //---------------------------------------------------------------------

    
Indicates whether the cursor is before the first row in this ResultSet object.

Returns:
true if the cursor is before the first row; false if the cursor is at any other position or the result set contains no rows
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean isBeforeFirst() throws  SQLException {
         return .isBeforeFirst();
    }

    
Indicates whether the cursor is after the last row in this ResultSet object.

Returns:
true if the cursor is after the last row; false if the cursor is at any other position or the result set contains no rows
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean isAfterLast() throws  SQLException {
        return .isAfterLast();
    }

    
Indicates whether the cursor is on the first row of this ResultSet object.

Returns:
true if the cursor is on the first row; false otherwise
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean isFirst() throws  SQLException {
         return .isFirst();
    }

    
Indicates whether the cursor is on the last row of this ResultSet object. Note: Calling the method isLast may be expensive because the JDBC driver might need to fetch ahead one row in order to determine whether the current row is the last row in the result set.

Returns:
true if the cursor is on the last row; false otherwise
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean isLast() throws  SQLException {
       return .isLast();
    }

    
Moves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.

Throws:
java.sql.SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void beforeFirst() throws  SQLException {
        checkCursorMove();
        .beforeFirst();
        notifyRowUpdater();
    }

    
Moves the cursor to the end of this ResultSet object, just after the last row. This method has no effect if the result set contains no rows.

Throws:
java.sql.SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void afterLast() throws  SQLException {
        checkCursorMove();
        .afterLast();
        notifyRowUpdater();
    }

    
Moves the cursor to the first row in this ResultSet object.

Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
java.sql.SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean first() throws  SQLException {
        checkCursorMove();
        boolean result = .first();
        if (result)
            notifyRowUpdater();
        return result;
    }

    
Moves the cursor to the last row in this ResultSet object.

Returns:
true if the cursor is on a valid row; false if there are no rows in the result set
Throws:
java.sql.SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean last() throws  SQLException {
        checkCursorMove();
        boolean result = .last();
        if (result)
            notifyRowUpdater();
        return result;
    }

    
Retrieves the current row number. The first row is number 1, the second number 2, and so on.

Returns:
the current row number; 0 if there is no current row
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public int getRow() throws  SQLException {
       return .getRowNum();
    }

    
Moves the cursor to the given row number in this ResultSet object.

If the row number is positive, the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on.

If the given row number is negative, the cursor moves to an absolute row position with respect to the end of the result set. For example, calling the method absolute(-1) positions the cursor on the last row; calling the method absolute(-2) moves the cursor to the next-to-last row, and so on.

An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before the first row or after the last row.

Note: Calling absolute(1) is the same as calling first(). Calling absolute(-1) is the same as calling last().

Returns:
true if the cursor is on the result set; false otherwise
Throws:
java.sql.SQLException if a database access error occurs, the row is 0, or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean absoluteint row ) throws  SQLException {
        checkCursorMove();
        boolean result = .absolute(row);
        if (result)
            notifyRowUpdater();
        return result;
    }

    
Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row. Calling relative(0) is valid, but does not change the cursor position.

Note: Calling the method relative(1) is different from calling the method next() because is makes sense to call next() when there is no current row, for example, when the cursor is positioned before the first row or after the last row of the result set.

Returns:
true if the cursor is on a row; false otherwise
Throws:
java.sql.SQLException if a database access error occurs, there is no current row, or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean relativeint rows ) throws  SQLException {
        checkCursorMove();
        boolean result = .relative(rows);
        if (result)
            notifyRowUpdater();
        return result;
    }

    
Moves the cursor to the previous row in this ResultSet object.

Note: Calling the method previous() is not the same as calling the method relative(-1) because it makes sense to callprevious() when there is no current row.

Returns:
true if the cursor is on a valid row; false if it is off the result set
Throws:
java.sql.SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public boolean previous() throws  SQLException {
        checkCursorMove();
        boolean result = .previous();
        if (result)
            notifyRowUpdater();
        return result;
    }
    //---------------------------------------------------------------------
    // Properties
    //---------------------------------------------------------------------

    
Gives a hint as to the direction in which the rows in this ResultSet object will be processed. The initial value is determined by the Statement object that produced this ResultSet object. The fetch direction may be changed at any time.

Throws:
java.sql.SQLException if a database access error occurs or the result set type is TYPE_FORWARD_ONLY and the fetch direction is not FETCH_FORWARD
Since:
1.2
See also:
What Is in the JDBC 2.0 API
java.sql.Statement.setFetchDirection(int)
    public void setFetchDirection(int directionthrows  SQLException {
         if (direction != .)
            throw new FBDriverNotCapableException("Can't set fetch direction");
    }

    
Returns the fetch direction for this ResultSet object.

Returns:
the current fetch direction for this ResultSet object
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public int getFetchDirection() throws  SQLException {
       return .;
    }

    
Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for this ResultSet object. If the fetch size specified is zero, the JDBC driver ignores the value and is free to make its own best guess as to what the fetch size should be. The default value is set by the Statement object that created the result set. The fetch size may be changed at any time.

Parameters:
rows the number of rows to fetch
Throws:
java.sql.SQLException if a database access error occurs or the condition 0 <= rows <= this.getMaxRows() is not satisfied
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void setFetchSize(int rowsthrows  SQLException {
         if (rows < 0)
             throw new FBSQLException("Can't set negative fetch size.",
                     .);
         
         else if ( > 0 && rows > )
             throw new FBSQLException("Can't set fetch size > maxRows.",
                     .);
         else
        .setFetchSize(rows);
    }

    
Returns the fetch size for this ResultSet object.

Returns:
the current fetch size for this ResultSet object
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public int getFetchSize() throws  SQLException {
        return .getFetchSize();
    }

    
Returns the type of this ResultSet object. The type is determined by the Statement object that created the result set.

Returns:
TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or TYPE_SCROLL_SENSITIVE
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public int getType() throws  SQLException {
        return ;
    }

    
Returns the concurrency mode of this ResultSet object. The concurrency used is determined by the Statement object that created the result set.

Returns:
the concurrency type, either CONCUR_READ_ONLY or CONCUR_UPDATABLE
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public int getConcurrency() throws  SQLException {
        return ;
    }

    
Retrieves the holdability of this ResultSet object

Returns:
either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
Throws:
java.sql.SQLException if a database access error occurs or this method is called on a closed result set
Since:
1.6
    public int getHoldability() throws SQLException {
        return ;
    }
    //---------------------------------------------------------------------
    // Updates
    //---------------------------------------------------------------------

    
Indicates whether 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
Since:
1.2
See also:
java.sql.DatabaseMetaData.updatesAreDetected(int)
What Is in the JDBC 2.0 API
    public boolean rowUpdated() throws  SQLException {
        if ( != null)
            return .rowUpdated();
        else
            throw new FBResultSetNotUpdatableException();
    }

    
Indicates whether the current row has had an insertion. The value returned depends on whether or not this ResultSet object can detect visible inserts.

Returns:
true if a row has had an insertion and insertions are detected; false otherwise
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
java.sql.DatabaseMetaData.insertsAreDetected(int)
What Is in the JDBC 2.0 API
    public boolean rowInserted() throws  SQLException {
        if ( != null)
            return .rowUpdated();
        else
            throw new FBResultSetNotUpdatableException();
    }

    
Indicates whether a 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 this ResultSet object can detect deletions.

Returns:
true if a row was deleted and deletions are detected; false otherwise
Throws:
java.sql.SQLException if a database access error occurs
Since:
1.2
See also:
java.sql.DatabaseMetaData.deletesAreDetected(int)
What Is in the JDBC 2.0 API
    public boolean rowDeleted() throws  SQLException {
        if ( != null)
            return .rowUpdated();
        else
            throw new FBResultSetNotUpdatableException();
    }

    
Gives 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateNull(int columnIndexthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setNull();
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateBoolean(int columnIndexboolean xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setBoolean(x);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateByte(int columnIndexbyte xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setByte(x);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateShort(int columnIndexshort xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setShort(x);
    }

    
Updates the designated column with an int 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateInt(int columnIndexint xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setInteger(x);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateLong(int columnIndexlong xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setLong(x);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateFloat(int columnIndexfloat xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setFloat(x);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateDouble(int columnIndexdouble xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setDouble(x);
    }

    
Updates the designated column with a java.math.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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateBigDecimal(int columnIndexBigDecimal xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setBigDecimal(x);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateString(int columnIndexString xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setString(x);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateBytes(int columnIndexbyte x[]) throws  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setBytes(x);
    }

    
Updates the designated column with a java.sql.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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateDate(int columnIndexDate xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setDate(x);
    }

    
Updates the designated column with a java.sql.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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateTime(int columnIndexTime xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setTime(x);
    }

    
Updates the designated column with a java.sql.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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateTimestamp(int columnIndexTimestamp xthrows  SQLException {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setTimestamp(x);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateAsciiStream(int columnIndexInputStream x,
               int lengththrows  SQLException 
    {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setAsciiStream(xlength);
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateBinaryStream(int columnIndexInputStream x,
                int lengththrows  SQLException 
    {
        if ( == null)
            throw new FBResultSetNotUpdatableException();
        
        getField(columnIndex).setBinaryStream(xlength);
    }
    
    public void updateBinaryStream(int columnIndexInputStream xlong length)
            throws SQLException {
        throw new FBDriverNotCapableException();
    }
    public void updateBinaryStream(int columnIndexInputStream x)
            throws SQLException {
        throw new FBDriverNotCapableException();
    }
    public void updateBinaryStream(String columnLabelInputStream x,
            long lengththrows SQLException {
        throw new FBDriverNotCapableException();
    }
    public void updateBinaryStream(String columnLabelInputStream x)
            throws SQLException {
        throw new FBDriverNotCapableException();
    }

    
Updates the designated 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
Since:
1.2
See also:
What Is in the JDBC 2.0 API
    public void updateCharacterStream(int columnIndex