-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andy Jefferson wrote:

> Mark Matthews wrote:
>
>>MySQL doesn't have schemas (currently). They are being developed in a
>>future version. The DatabaseMetaData interface in JDBC has a method,
>>'getSchemaTerm' which tells you whether a certain database supports
>>schemas or not (returning "" when schemas are not supported). MySQL
>>supports _catalogs_, so you would use the DatabaseMetaData method
>>'getCatalogs' to see all catalogs (databases in 'mysql' vernacular) in
>>your database, or the 'getCatalog' method in the Connection interface to
>>retreive the catalog the connection is currently using.
>
>
> Thanks Mark, that helps a lot.
>
> If I call
> database.getCatalogs();
> I get a list of all of my databases ... about 6 of them - so thats ok.
>
> If I then call
> databasemetadata.getTables(null,null,"table-name",null);
> I get catalogName as "", schemaName as null, tableName as "table-name".
> So why is it returning the catalogName for this table as "" (i.e no
catalog)
> if catalog maps across to 'database' in MySQL ?

Looks like a bug. Currently, I have catalogName returnning what you
passed in for catalog in the getTables() method. I'll fix that.

Regards,

        -Mark

- --
Mr. Mark Matthews
MySQL AB, Software Development Manager, J2EE and Windows Platforms
Office: +1 708 557 2388
www.mysql.com

Are you MySQL Certified?
http://www.mysql.com/certification/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQE/eEdAtvXNTca6JD8RAq0TAJ4/ULPFuzx8Er5na8o/m0AmDmvpSwCgqNYg
Q3wD6N1eWk4CExxjczl7Fo8=
=1yOQ
-----END PGP SIGNATURE-----


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to