$ mysql --version
mysql Ver 12.20 Distrib 4.0.13, for pc-linux (i686)
oh
Is it possible that it regressed?
I don't know, but it seems unlikely
In case it's important, I'm running Redhat 9
I'm afraid I can't help you further ; the only thing I can give
you is my setup, which works :
OS is Win2000, I have no idea of mysqld differences between this and RH
JDK is 1.4.1
Server is 4.0.12 (3.51 doesn't work with foreign keys, but 4.0.13 should)
Connector/J is 4.0.7 (again, I don't see any reason why 4.0.8 should be
broken)
(maybe look at the changelogs for the last two components ?)
and finally a snip of code that runs and does the job :
ResultSet fkeys = dmd.getImportedKeys(dbName, null, tName);
while (fkeys.next()) {
String fkName = fkeys.getString("FKCOLUMN_NAME").toUpperCase();
String rTable = fkeys.getString("PKTABLE_NAME").toUpperCase();
String rCol = fkeys.getString("PKCOLUMN_NAME").toUpperCase();
myTables[i].getColumn(fkName).setForeignKey(rTable, rCol);
}
fkeys.close();
hth,
Simon