Hi, all.

During improving of own DataBase API I encountered a problem:
<code>java.sql.ResultSetMetaData.getTableName(int column)</code> always
return empty string.
There is a descrioption in JavaDoc:
<quot>
Gets the designated column's table name.
 Parameters:
  column - the first column is 1, the second is 2, ...
 Returns:
  table name or "" if not applicable
 Throws:
  SQLException - if a database access error occurs
</quot>
Cuase I'm using Oracle DataBase I decompile class
<code>oracle.jdbc.driver.OracleResultSetMetaData</code> and take a look
at appropriate method:
<code>
    public String getTableName(int i)
        throws SQLException
    {
        return "";
    }
</code>

As I understand method <code>getTableName(int column)</code> is not
applicable in Oracle's JDBC driver and drivers of some other DB vendors
checked later by myself.

So, I have two questions:
1. Is there any DataBase vendor in which driver method described above
IS APPLICABLE? And
2. Why method with postscript <quot>or "" if not applicable</quot> is
included in SDK? Even most powerfull(IMHO) DataBase vendor, Oracle,
doesn't consider necessary to make it applicable in his driver.

P.S. May be this postscript was included because DataBase drivers that
work through jdbc-odbc bridge and can't support such a method as I know.
But this is not a reason for skipping methods implementation in pure
jdbc drivers I think.

============
Best Regards
Mike


To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm

Reply via email to