db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: [Fwd: Re: How to run the Apache DB Torque tutorial with Derby]
Date Tue, 11 Oct 2005 22:50:14 GMT
Satheesh Bandaram wrote:

> I interpret ResultSetMetaData to describe the ResultSet, not the base
> column of the table. If someone is interested in knowing whether a
> column of a table is readonly/definetely not writable, wouldn't they be
> using DatabaseMetaData or some other API to check that? I would expect
> ResultSetMetaData to describe the ResultSet itself, like
> Connection.isReadOnly() would indicate if a connection is readonly not
> if the database itself is readonly.
> I agree this could be cleared in the spec. I looked at ODBC spec at
> Microsoft site. While there is no 1-1 matching between JDBC and ODBC,
> the following does this seem to favor my argument. Should we have a show
> of hands if this ODBC spec agrees with my argument or not? :-)

The ODBC argument is pretty powerful that the ResultSetMetaData
describes the ResultSet, not the underlying table.
But then we have ResultSetMetaData.isSearchable, that definitely is
describing the underlying table and not the result set. Maybe it's the
exception that proves the rule :-)


> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcresult_set_metadata.asp
> (ODBC 1.0) 	Column is described by the values for the defined constants:
> SQL_DESC_UPDATABLE *describes the updatability of the column in the
> result set, not the column in the base table*. The updatability of the
> base column on which the result set column is based may be different
> from the value in this field. Whether a column is updatable can be based
> on the data type, user privileges, and the definition of the result set
> itself. If it is unclear whether a column is updatable,
> SQL_ATTR_READWRITE_UNKNOWN should be returned.

View raw message