1

Re: import error: fk_taxon_occurrence_sample

Failed to insert LC000009000006F8 into TAXON_OCCURRENCE
Database Error Message:
INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_TAXON_OCCURRENCE_SAMPLE'. The conflict occurred in database 'NBNData', table 'SAMPLE', column 'SAMPLE_KEY'.The statement has been terminated.

i assume that the dataset that i'm trying to export is from Recoder 3, which has been migrated to Recorder 2000.

Anyone has solution for this error?

Cheers

IT Officer
rECOrd (A Biodiversity Information System for Cheshire, Halton, Warrington and Wirral)
www.record-lrc.co.uk

2

Re: import error: fk_taxon_occurrence_sample

It looks like you're trying to import a taxon occurrence that is missing its parent sample which is a scenario that shouldn't be possible with a standard Recorder 2002/6 export. Where has this export come from?

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

3

Re: import error: fk_taxon_occurrence_sample

this is an export from recorder 2000.
there aren't any occurrences display under the sample if you look in Recorder 2000. But if you have a look in access there is occurrences key under the sample key, which somehow didn't display properly in Recorder 2000.

Could it be that this checking wasn't implemented for migrating recorder 3 to recorder 2000? If you looked in the recorder 2000 access in relationship between Taxon_Occurrence and Sample_Key, the Cascade Update Related Fields and Cascade Delete Related Records hasn't been set but in SQL Server this 2 setting is set.

Luck

IT Officer
rECOrd (A Biodiversity Information System for Cheshire, Halton, Warrington and Wirral)
www.record-lrc.co.uk

4 (edited by Luck 13-09-2007 10:59:16)

Re: import error: fk_taxon_occurrence_sample

i'm getting the original copy and will try to see if there is problem when we exporting or the data itself at the back.

IT Officer
rECOrd (A Biodiversity Information System for Cheshire, Halton, Warrington and Wirral)
www.record-lrc.co.uk

5

Re: import error: fk_taxon_occurrence_sample

If occurrences aren't displaying in Recorder but you know they should be there, it usually means there's a problem with the determination. Check to see if you have determinations related to the "missing" occurrences. If you do have determinations, check to see if the taxon referenced by the det. exists in the dictionary.

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

6

Re: import error: fk_taxon_occurrence_sample

Taxon occurrence key is missing on determination table. Could this happen on the earlier version of Export on Recorder 2000?

IT Officer
rECOrd (A Biodiversity Information System for Cheshire, Halton, Warrington and Wirral)
www.record-lrc.co.uk

7

Re: import error: fk_taxon_occurrence_sample

Do you mean the taxon_occurrence_key column is missing from the taxon_determination table, or do you mean that there are taxon_determinations that have empty (null) taxon_occurrence_keys?

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

8

Re: import error: fk_taxon_occurrence_sample

taxon_occurrence_key data is key missing from taxon_determination table

cheers

Luck

IT Officer
rECOrd (A Biodiversity Information System for Cheshire, Halton, Warrington and Wirral)
www.record-lrc.co.uk

9

Re: import error: fk_taxon_occurrence_sample

Hmm. I've no idea why these keys would be missing from the taxon_determination table. It must be a bug in the Recorder 2000 export routine or something like that. Sorry I can't be of any more help than that.

Have you tried re-exporting? Also check to make sure that the occurrences in R2000 are all ticked.

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

10

Re: import error: fk_taxon_occurrence_sample

There are 96 species in the Recorder 3 dictionary which are not in the Recorder 3 list in the Recorder 6/Recorder 2002 dictionary. If a Recorder 3 system contains records for any of these, then unless corrective action is taken, the records for them transfer without a Taxon_list_item_key (if I remember correctly). If a record doesn’t have a Taxon_list_item_key it cannot be displayed in the observation hierarchy because there is no species name to display.

In a R2002 to R6 data transfer I did recently nearly 200 taxon occurrences didn't transfer because they didn't have a sample in Recorder 2002; over 50,000 taxon determinations didn't transfer because they didn't have a taxon occurrence or because their taxon occurrence couldn't be transferred because it didn't have a sample in Recorder 2002. Nearly 200  taxon occurrence data entries didn't transfer because their taxon occurrences didn't transfer. These problems were all in Recorder 2002 so they were nothing to do with the R2002 to R6 data transfer. I don't know how this could have happened in Recorder 2002 but the customer said they thought it was due to problems with a very early version (2000-2001) of the import wizard.

Sally Rankin, JNCC Recorder Approved Expert
E-mail: s.rankin@btinternet.com
Telephone: 01491 578633
Mobile: 07941 207687

11

Re: import error: fk_taxon_occurrence_sample

thank Sally for the info. We decided to drop those records with the missing relational keys.

IT Officer
rECOrd (A Biodiversity Information System for Cheshire, Halton, Warrington and Wirral)
www.record-lrc.co.uk