db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: [Fwd: Re: How to run the Apache DB Torque tutorial with Derby]
Date Mon, 10 Oct 2005 05:40:17 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
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.<br>
<br>
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?<span
 class="moz-smiley-s1"><span> :-) </span></span><br>
<br>
<a class="moz-txt-link-freetext" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcresult_set_metadata.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcresult_set_metadata.asp</a><br>
<br>
<table _base_target="_top" class="dtTABLE" cellspacing="0">
  <tbody _base_target="_top">
    <tr _base_target="_top" valign="top">
      <td width="5%">SQL_DESC_UPDATABLE<br>
(ODBC 1.0)</td>
      <td width="39%">Column is described by the values for the defined
constants:
      <p>SQL_ATTR_READONLY<br>
SQL_ATTR_WRITE<br>
SQL_ATTR_READWRITE_UNKNOWN</p>
      <p>SQL_DESC_UPDATABLE <b>describes the updatability of the
column in the result set, not the column in the base table</b>. 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.</p>
      </td>
    </tr>
  </tbody>
</table>
<br>
Satheesh<br>
<br>
Daniel John Debrunner wrote:<br>
<blockquote cite="mid4347DD02.3090102@debrunners.com" type="cite">
  <pre wrap="">
Though of course, the spec could be cleared up, writable in what sense?
Through a positioned update/dml, through updateable result set, through
any DML statement? I think this method has been there since JDBC 1.1 so
that means it cannot mean just with respect to updateable result sets
since they were added in JDBC 2.0. Which probably means is the column
definitely not writable by any operation.

Dan.
  </pre>
</blockquote>
</body>
</html>


Mime
View raw message