Please help!!! (1 Viewer)

Johnmad86

Registered User.
Local time
Today, 00:49
Joined
Jul 15, 2013
Messages
36
We have suffered a large amount of data loss as part of a bulk import that went badly on sharepoint.

As a result roughly half the data from a table in the database is now missing, the records are still present but only the surname remains populated.

I have managed to combine previous backups into a new spreadsheet so that all the data is available, however, the table that is missing the data has the primary key "CandidateID" and this is referenced by other tables in the database.

When trying to import the spreadsheet into a new table, Access insists on allocating a new CandidateID, so the existing references are lost.

I have managed to import the data as is, but with the sacrifice of no longer having CandidateID as an autonumber field.

Does anyone know an easy way (or any way) to get the data imported whilst keeping the candidateID as an autonumber?

Or failing the above, any way to work around this.

Many thanks
 

bob fitz

AWF VIP
Local time
Today, 00:49
Joined
May 23, 2011
Messages
4,719
Does anyone know an easy way (or any way) to get the data imported whilst keeping the candidateID as an autonumber?
Why is it important to keep the AutoNumber.
 

Johnmad86

Registered User.
Local time
Today, 00:49
Joined
Jul 15, 2013
Messages
36
thanks for the reply.

I'm not sure how else a new record would be given a unique ID. Also, the database is designed with the CandidateID as the primary key, and this will need to stay the same without re-designing the whole database around this.
 

bob fitz

AWF VIP
Local time
Today, 00:49
Joined
May 23, 2011
Messages
4,719
thanks for the reply.

I'm not sure how else a new record would be given a unique ID. Also, the database is designed with the CandidateID as the primary key, and this will need to stay the same without re-designing the whole database around this.

It doesn't have to be an AutoNumber type field to be a PK. Why not import the table, set CandidateID as the PK, then put some code in any form that can add records to the table to set the value of CandidateID to the highest current value + 1.
 

Johnmad86

Registered User.
Local time
Today, 00:49
Joined
Jul 15, 2013
Messages
36
Thank you for the help. The issue was with the fact that it is a Web database, so many things that are usually easy (changing primary key field etc) are very difficult to do.

We managed to fix the issue by manually copying and pasting the missing data into the table, so crisis averted.
 

Users who are viewing this thread

Top Bottom