[AccessD] Fixing Orphaned Rows

Rocky Smolin rockysmolin at bchacc.com
Thu Jan 24 08:04:58 CST 2013


I've done it that way before but you can't establish RI unless all of the
FKs in the other tables have a PK in the Person table. Of course, that's one
way to assure you've got no other orphaned records.  But if you just want to
establish a few person records for testing and development, and need RI,
then that won't work.

Faster, if your client will cooperate, is to have them make a copy of the
original database and then delete the names, social security numbers, etc.
So all the person records are there, just no confidential info.

Rocky


-----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