problem in csv import

Notes and reports about symfony 1.0.x stable

Moderators: dwhittle, Ian

problem in csv import

Postby vijendra sisodiya » Sat Sep 25, 2010 8:44 am

I have a problem for CSV import ,it not permitted me for insert a single record.

please see the error when i am importing csv--
Unable to execute INSERT statement. [wrapped: Could not execute update [Native Error: Cannot add or update a child row: a foreign key constraint fails (`cemetery/funeral_director`, CONSTRAINT `funeral_director_ibfk_6` FOREIGN KEY (`cemetery_id`) REFERENCES `cemetery` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE)] [User Info: INSERT INTO funeral_director (COUNTRY_ID,CEMETERY_ID,CODE,COMPANY_NAME,ADDRESS1,ADDRESS2,ADDRESS3,STATE,POST,CONTACT_NAME,PHONE,FAX_NUMBER) VALUES (1,2,'102','ASHES11','','','','','','','','')]]

please give me reply fast. :proud: :proud: :proud:
vijendra sisodiya
Junior Member
 
Posts: 19
Joined: Wed Aug 18, 2010 12:24 pm

Re: problem in csv import

Postby claudia_k » Sat Sep 25, 2010 10:40 am

Hi there

It looks like the record you try to import contains a cemetery_id, but the corresponding record in the cemetery table does not exist yet. So first import your cemetery records, then these records.

Claudia
claudia_k
Faithful Member
 
Posts: 265
Joined: Mon Jun 21, 2010 8:12 pm
Location: Luxembourg

Re: problem in csv import

Postby vijendra sisodiya » Mon Sep 27, 2010 11:10 am

Thanx claudia_k
your suggesstion relly true ,csv file for inserting row is successfully import. :)~:-)~:smile: :)~:-)~:smile:
vijendra sisodiya
Junior Member
 
Posts: 19
Joined: Wed Aug 18, 2010 12:24 pm


Return to symfony 1.0

Who is online

Users browsing this forum: No registered users and 0 guests