On 23 Sep 2005 07:48:15 -0700,
wrote or quoted :
>In the interface ResultSet, there is one called TYPE_FORWARD_ONLY.
>Does this mean that any ResultSet object has a field called
>TYPE_FORWARD_ONLY ? Can I set it ? The field is static and returns an
>int. An int ? wouldnt it seem more reasonable boolean ?
Don't be afraid to peek at Sun's code with an IDE. It lives in src.zip
/**
* The constant indicating the type for a <code>ResultSet</code>
object
* whose cursor may move only forward.
* @since 1.2
*/
int TYPE_FORWARD_ONLY = 1003;
....
* @return <code>ResultSet.TYPE_FORWARD_ONLY</code>,
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>,
* or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
* @exception SQLException if a database access error occurs
* @since 1.2
*/
int getType() throws SQLException;
These are CONSTANTS representing an enum in the days before enums.
You will typically see these constants being used as parameters or
returned from methods, or rarely that you can use to set some variable
directly or make sense of some other variable''s coding int value..
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.