1 (edited by James Dargie 26-04-2013 09:34:46)

Topic: Merging datasets (NBNData - not snapshot)

I needed to get rid of a survey from our NBNData file [custodianship has moved elsewhere]. I could do this through the user interface, but to do this means I have to individually delete samples, and then events before I can delete the survey. In a way this is good it means it is really hard to zap data by accident. However, in a survey with 60 plus events all with multiple samples that would have taken me a couple of hours.

So knowing that I can merge surveys into an empty NBNData.mdb I chose to do just this for all except the survey I wanted rid of. I can now archive the old NBNData & run with the new one, having reset the AutoCheckOnLoad setting in the marine.ini file. Smart? Well nearly, but not quite.....

All the user accounts are of course gone, not too much of a problem as we don't have that many and I can get them all set up again. However, I noticed that on the main menu that although it was picking up my User login & the SiteID the Dataset SiteID was blank, as this of course cannot be transferred across in a merge as most of the time you would not want a merge to change this value. So I sorted that by inserting the "SiteID" & "MRSNH100" as values in Name & data as a new record in the Settings table; so now the Main menu correctly displays the Dataset SiteID.

But now I'm worried I don't trust the values in the Last_key table which are markedly different in the new and old NBNData files. So does anyone know how I force these to update? Or maybe I don't need to worry about these?

2

Re: Merging datasets (NBNData - not snapshot)

Eventually forced this one to a solution, all stems back to the shortcut I took instead of spending hours deleting a survey, i.e. I merged out the data into an empty NBNData.mdb without the survey I wanted to zap. But that does not update the values in the LAST_KEY table, and so the system can't create new keys as it looks for the next key and finds it already exists....

The solution is to zap the SiteID and Check code values from in the marine.ini file, set AutoCheckOnLoad to 1 & fire up MR, you will be prompted to re-enter the SiteID & check code, and the system then goes away and updates the values in the LAST_KEY table, & voila, that and a number of other data entry issues disappear.

Lesson learned: there is always a solution even if it is brutal.