Skip navigation links

MySQL Forums :: JDBC and Java :: JDBC metadata for columns doesn't include table name


Advanced Search

Re: JDBC metadata for columns doesn't include table name
Posted by: Mark Matthews ()
Date: November 10, 2005 02:50AM

Fred Romelfanger wrote:
> I have the following code that I was having
> problems with
>
> ResultSet rs = md.getColumns(null, null,
> null, null);
> while(rs.next()) {
> final String tableName =
> rs.getString("TABLE_NAME");
> if(tableName == null) {
> System.out.println("column with no
> table name");
> continue;
> }
>
> getTables() works fine and returns the table name,
> but trying to get all of the columns and
> then matching them up with the tables isn't
> working out becuase none of the columns appear
> to have table names. The jdbc documentation
> indicates that getColumns() should return
> the table name.
>
> Any ideas other than getting the columns
> individually by table name?
>
> This code works fine with the Sybase JDBC driver.


Looks like a bug. I'll file a bug and get this fixed.

-Mark

Mark Matthews
Architect - Enterprise Tools
Database Group - Sun Microsystems
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject Written By Posted
JDBC metadata for columns doesn't include table name Fred Romelfanger 11/09/2005 12:08PM
Re: JDBC metadata for columns doesn't include table name Mark Matthews 11/10/2005 02:50AM
Re: JDBC metadata for columns doesn't include table name Mark Matthews 11/10/2005 03:41AM


Sorry, you can't reply to this topic. It has been closed.