Sonj McCoy wrote:

Hello Everyone,



I am having problems with foreign keys in MySQL InnoDB type databases.
For some reason, when adding a new record within an MS Access subform
(based on a query of two tables (parent table and child table), the
corresponding foreign key column in the child table not getting
populated. The rest of the columns are being populated. I have rebuilt
the indexes and foreign keys and this problem still occurs. Is there
anything that I could be doing wrong? All tables have time stamps, the
primary key is auto-numbered integer and the foreign key is an integer.


You should only input data into one table at once. Access will *attempt* to let you use multi-table queries to add records, but it doesn't work properly, and the thought of it makes me shudder anyway. Even updating data in multi-table queries gives problems. You can *sometimes* set the form's / query's 'Recordset Type' property to 'Dynaset ( Inconsistent Updates )', but as I've said, this rarely works properly, and gets worse as the table gets bigger.

Data in a parent record should be entered first, from a 'main' form, and data in a child record should be entered *after*, from a 'sub' form. Try anything else and you're asking for problems.

Dan

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

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

Reply via email to