< prev index next >

src/java.sql/share/classes/java/sql/ResultSet.java

Print this page
rev 60127 : 8249205: Remove unnecessary trademark symbols


  73  *
  74  * <P>For the getter methods, a JDBC driver attempts
  75  * to convert the underlying data to the Java type specified in the
  76  * getter method and returns a suitable Java value.  The JDBC specification
  77  * has a table showing the allowable mappings from SQL types to Java types
  78  * that can be used by the <code>ResultSet</code> getter methods.
  79  *
  80  * <P>Column names used as input to getter methods are case
  81  * insensitive.  When a getter method is called  with
  82  * a column name and several columns have the same name,
  83  * the value of the first matching column will be returned.
  84  * The column name option is
  85  * designed to be used when column names are used in the SQL
  86  * query that generated the result set.
  87  * For columns that are NOT explicitly named in the query, it
  88  * is best to use column numbers. If column names are used, the
  89  * programmer should take care to guarantee that they uniquely refer to
  90  * the intended columns, which can be assured with the SQL <i>AS</i> clause.
  91  * <P>
  92  * A set of updater methods were added to this interface
  93  * in the JDBC 2.0 API (Java&trade; 2 SDK,
  94  * Standard Edition, version 1.2). The comments regarding parameters
  95  * to the getter methods also apply to parameters to the
  96  * updater methods.
  97  *<P>
  98  * The updater methods may be used in two ways:
  99  * <ol>
 100  * <LI>to update a column value in the current row.  In a scrollable
 101  *     <code>ResultSet</code> object, the cursor can be moved backwards
 102  *     and forwards, to an absolute position, or to a position
 103  *     relative to the current row.
 104  *     The following code fragment updates the <code>NAME</code> column
 105  *     in the fifth row of the <code>ResultSet</code> object
 106  *     <code>rs</code> and then uses the method <code>updateRow</code>
 107  *     to update the data source table from which <code>rs</code> was derived.
 108  * <PRE>
 109  *
 110  *       rs.absolute(5); // moves the cursor to the fifth row of rs
 111  *       rs.updateString("NAME", "AINSWORTH"); // updates the
 112  *          // <code>NAME</code> column of row 5 to be <code>AINSWORTH</code>
 113  *       rs.updateRow(); // updates the row in the data source




  73  *
  74  * <P>For the getter methods, a JDBC driver attempts
  75  * to convert the underlying data to the Java type specified in the
  76  * getter method and returns a suitable Java value.  The JDBC specification
  77  * has a table showing the allowable mappings from SQL types to Java types
  78  * that can be used by the <code>ResultSet</code> getter methods.
  79  *
  80  * <P>Column names used as input to getter methods are case
  81  * insensitive.  When a getter method is called  with
  82  * a column name and several columns have the same name,
  83  * the value of the first matching column will be returned.
  84  * The column name option is
  85  * designed to be used when column names are used in the SQL
  86  * query that generated the result set.
  87  * For columns that are NOT explicitly named in the query, it
  88  * is best to use column numbers. If column names are used, the
  89  * programmer should take care to guarantee that they uniquely refer to
  90  * the intended columns, which can be assured with the SQL <i>AS</i> clause.
  91  * <P>
  92  * A set of updater methods were added to this interface
  93  * in the JDBC 2.0 API (Java 2 SDK,
  94  * Standard Edition, version 1.2). The comments regarding parameters
  95  * to the getter methods also apply to parameters to the
  96  * updater methods.
  97  *<P>
  98  * The updater methods may be used in two ways:
  99  * <ol>
 100  * <LI>to update a column value in the current row.  In a scrollable
 101  *     <code>ResultSet</code> object, the cursor can be moved backwards
 102  *     and forwards, to an absolute position, or to a position
 103  *     relative to the current row.
 104  *     The following code fragment updates the <code>NAME</code> column
 105  *     in the fifth row of the <code>ResultSet</code> object
 106  *     <code>rs</code> and then uses the method <code>updateRow</code>
 107  *     to update the data source table from which <code>rs</code> was derived.
 108  * <PRE>
 109  *
 110  *       rs.absolute(5); // moves the cursor to the fifth row of rs
 111  *       rs.updateString("NAME", "AINSWORTH"); // updates the
 112  *          // <code>NAME</code> column of row 5 to be <code>AINSWORTH</code>
 113  *       rs.updateRow(); // updates the row in the data source


< prev index next >