MySQL Forums
Forum List  »  MySQL for Visual Studio

Error "Cannot add or update a child row: a foreign key constraint fails when try insert new record" VS2010, VS2012
Posted by: Luis Chuello
Date: September 19, 2014 08:57PM

Hi All!

ENGLISH:
I've spent all week trying to create a Master-Detail form with controls data bound using the wizard, but when inserting a new record gives me the error "Can not add or update a child row: a foreign key constraint fails" at first I was using VS 2010 and Connector 6.6.6, then I changed the connector to version 6.9.3 + MySQL 1.2.3 for Visual Studio, after making multiple attempts get the same error and I decided to upgrade to VS 2012, using the MySQL Connector 6.9.3 + 1.2.3 for Visual Studio and I'm still getting the same error! Someone can tell me a solution to my problem please?

I have Windows 7 Ultimate SP1, and MySQL 5.6.17 (installed with WampServer. Please help me.

ESPAÑOL:
He pasado toda la semana tratando de crear un formulario Maestro-Detalle con controles enlazados a datos usando el asistente, pero al momento de insertar un nuevo registro me lanza el error "Cannot add or update a child row: a foreign key constraint fails", en un principio yo usaba VS 2010 y el Conector 6.6.6, luego cambié el Conector a la versión 6.9.3 + MySQL for Visual Studio 1.2.3, luego de hacer múltiples intentos y obtener el mismo error decidí actualizar a VS 2012, usando el Conector 6.9.3 + MySQL for Visual Studio 1.2.3 y aún sigo recibiendo el mismo error! Alguién podrá decirme alguna solución a mi problema por favor?

Yo tengo Windows 7 Ultimate SP1, y MySQL 5.6.17 (instalado con WampServer. Por favor ayúdenme.

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.