Error on attempt to create relationship

ChemAxon e274e1bada

29-02-2008 14:22:05

This is a forwarded message from David Chalmers (Victorian College of Pharmacy)








I am trying to create a many to one relationship using IJC 2.2.1 on a MySQL


backed database.





I get the following error: New relationship creation failed:


StatementCallback; uncategorised SQLException for SQL [ALTER TABLE


SUPPLIER_DATA ADD CONSTRAINT FK_RELATIONSHIP FOREIGN KEY (X_ZINC_ID)


REFERENCES COMPOUND_DATA (ZINC_ID); SQL state [HY000]; error code [1005];


Can't create table '.zinc07/#sql-1243_af0.frm' (errno:150) ......





The tables are large, 6 and 10 million records.





Do you know if this is (a) a user problem (b) an instantjchem problem or


(c) a MySQL problem??





Thanks





David

ChemAxon fa971619eb

29-02-2008 14:37:21

David, the first thing to check is whether the default table type for MySQL is set to InnoDB. Without this table type you will not be able to define relationships (MyIASM tables to not support the use of foreign keys).


See http://www.chemaxon.com/instantjchem/ijc_latest/docs/user/help/htmlfiles/tips_and_tricks/db_impl_notes.html





To look at this use your MySQL administrattion tool (e.g. MySQL Administrator).





Tim

User 169b52bbd8

03-03-2008 11:46:20

Hi Tim,





That makes all the difference!





Regards





David