Search |
||
JDBC 4.0 RowId InterfacePosted by lancea on March 10, 2006 at 3:32 PM PST
The RowID interface was added to JDBC 4.0 in order to support the ROWID datatype which is supported by databases such as Oracle and DB2. A ROWID may be thought of as the address for a given row within a table and maybe be considered either logical or physical depending on the underlying data source.
The lifetime of a RowId object may be valid as long as the row is not deleted and the lifetime of the RowId is within the bounds of the lifetime of the RowId's data source. The DatabaseMetaDataMethod.getRowIdLifetime() can be used to determine the lifetime validity of the RowId object. The return value from this method is a RowIdLifetime enumerated data-type. Possible values are:
You can obtain a ROWID using the ResultSet.getRowId() method and may use the PreparedStatement.setRowId() to use a RowId in query. A RowId object value is typically not portable between data sources and should be considered as specific to the data source when using the set or update method in PreparedStatement and ResultSet objects respectively. It is therefore inadvisable to get a RowId from a ResultSet object with a connection ’Foo’ and then attempt to use the RowId in a unrelated ResultSet object with a connection ’Bar’. »
Related Topics >>
J2EE Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|