[AccessD] Fixing Orphaned Rows

Jim Lawrence accessd at shaw.ca
Thu Jan 24 12:50:07 CST 2013


Interesting question...

Had the same situation about two weeks ago, in a different database, caused
by a different reason. When it happened I did as you are thinking, changed
the autonumber field to a number, added in the lost autonumber rows, sorted
the tables but the numeric field, exported the effected tables, deleted the
old tables after making a similar structure empty tables and imported the
saved data in the new tables with the changed numeric fields to Autonumber.
To make a long story short; it worked.

This method should work for an Access table.(?)

Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller
Sent: Thursday, January 24, 2013 5:18 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Fixing Orphaned Rows

I'm doing some work on an Access db. Some information about some persons is
deemed confidential. Before sending me the db, the client deleted those
persons. Because the original "developer" (not a db professional) pretty
much ignored the rules of RI, rows in other tables are now orphaned.

The PK in the persons table is AutoNumber. My question is this: is there
some way that I can re-add rows to the Persons table and assign the numbers
that correspond to the rows that were deleted? (I can fill in the names
with junk for the time being.)

I realize that I could change the PK from AutoNum to LongInt, then manually
add the missing rows, but once I've done that will I be able to change the
column back to AutoNum? Or is there a better way to handle this?

TIA,

Arthur
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list