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

Alan Hodgkinson wrote:
Dear All,

I would like to extract the meta data describing foreign key relationships using ODBC (actually in Java using JDBC).

My current version of mySQl 3.23.49 does not seem to support
it. That is the methods DatabaseMetaData.getImportedKeys(...)
and DatabaseMetaData.getExportedKeys(..) return empty sets
on tables which have foreign keys defined on them.

Do newer versions of MySQL allow you to extract foreign key relation information?
The change log on the in the documentation at the MySQL site
implies that this _may_ be available for InnoDB tables (but makes no statement for non-InnoDB tables), as of version 3.32.50.

I don't want to do an upgrade unless I'm certain that I will get the feature.

Can anyone enlighten me?

Many thanks in advance,

Alan.
First, you need to use InnoDB tables to be able to extract foreign key information.

Second, are you trying to use the JDBC:ODBC bridge (not recommended at all), or the Type IV JDBC driver (MySQL Connector/J) to do this? Connector/J supports DatabaseMetaData.getImported/ExportedKeys(). The JDBC-ODBC bridge is pretty flakey with any database, and is not recommended to use in most cases.

-Mark

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+AzOptvXNTca6JD8RAhfSAKCifR5bxdoYTabqDAUPGq54/1WoSACeIr1q
43sMa5VZ/2PxrOCQ8gZYeec=
=ESNl
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to