MySQL Forums
Forum List  »  InnoDB

Re: error 1452 "cannot add or update a child row: foreign key constaint fails"
Posted by: Frances D
Date: August 31, 2006 10:32AM

I must admit I didn't read every last word in your post, but this has happened to me before and it was because data that I thought should have been uploaded to my last column (a text column) had actually been overflowing into the primary key of the following row due to the fact that I had incorrectly specified my 'optionally enclosed by '"' option (I think anyway--when I fixed my optionally enclosed by option I was able to upload). This can also happen if you don't terminate your lines with the proper line termination characters for your file type and OS. Using a csv I have to terminate my lines with '\r\n' or get a failure every time.

Hope this helps...

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.