1

Re: FK_NAME_RELATION_NAME1 and FK_NAME_RELATION_NAME2 import rejects

I've exported 3 individuals and have just tried importing them into a blank database. They import fine, but there are a few rejects (see the end of this post). The entities that are rejecting are an individual and organisation that are related/associated (via the Assocs. tab) with the individuals I am exporting; these related entities aren't present in the export files. Theoretically, the missing individual and organisation should have been picked up and exported by Recorder, but obviously they're being missed for some reason. The method I used to export the individuals is via a Rucksack; I added the individuals to the Rucksack and selected Tools -> Export Data then exported as NBN Access Database (zipped) and unticked Include Observations.

Items rejected by Recorder 6 in data imported at 17-23-02 on 07/10/2008:

Failed to insert THU000020000000V into NAME_RELATION
Database Error Message: 
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_NAME_RELATION_NAME2". The conflict occurred in database "NBNData", table "dbo.NAME", column 'NAME_KEY'.(-2147217873) The statement has been terminated.(-2147217873) 
--------------------

Failed to insert THU000020000000X into NAME_RELATION
Database Error Message: 
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_NAME_RELATION_NAME2". The conflict occurred in database "NBNData", table "dbo.NAME", column 'NAME_KEY'.(-2147217873) The statement has been terminated.(-2147217873) 
--------------------

Failed to insert THU0000200000010 into NAME_RELATION
Database Error Message: 
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_NAME_RELATION_NAME1". The conflict occurred in database "NBNData", table "dbo.NAME", column 'NAME_KEY'.(-2147217873) The statement has been terminated.(-2147217873) 
--------------------

Failed to insert THU0000200000011 into NAME_RELATION
Database Error Message: 
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_NAME_RELATION_NAME1". The conflict occurred in database "NBNData", table "dbo.NAME", column 'NAME_KEY'.(-2147217873) The statement has been terminated.(-2147217873) 
--------------------
Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

2

Re: FK_NAME_RELATION_NAME1 and FK_NAME_RELATION_NAME2 import rejects

Hi Charles,

Just to let you and everyon else know that this has been replicated here at JNCC and been passed on to Dorset software to fix.

Cheers,
Lynn

3

Re: FK_NAME_RELATION_NAME1 and FK_NAME_RELATION_NAME2 import rejects

Lynn,

Sally Rankin gave me a call about this and it is apparently like this by design. It's so that when you export an individual you don't cause a huge cascade of the related individuals and organisations to be exported too. It may be that you want to export all related individuals and orgs, but it may also be that you don't want all related individuals/orgs to be exported (you don't want to clutter the target database, or you're restricted by data protection issues). This latter state is what Recorder defaults to, but the matter is confused tremendously because it generates import rejects, which makes it look like something has gone wrong.

Ideally these import rejects should be handled more gracefully and, even more ideally, an option presented to the user to export related individuals/orgs if necessary.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

4

Re: FK_NAME_RELATION_NAME1 and FK_NAME_RELATION_NAME2 import rejects

Thanks Charles,

I've amended the request - this should be handled more gracefully after the next release.

Lynn