Add Primary Key field to existing large table

Wayne Cramer

Registered User.
Local time
Today, 15:14
Joined
Aug 10, 2007
Messages
93
I have a table with more than 700,000 records. There are no unique fields or unique combination of fields. I would like to add an AutoNumber field but when I try I get the message:

File sharing lock count exceeded. Increase MaxLocksPerFile registry entry.

If I answer yes I get an error that the new field was not added. Is there any way to add a key foield to an existing database?
 
A suggestion:

1. Turn off AutoCorrect

2. Copy the table, but copy the definition only. Then, add the column and use an append query to add the data to the new table.

3. Delete the old table and rename the new table to the old name.
 
Bob,
I performed steps two and three before your reply. It seemed the only way out after thinking about it. For my own learning purposes - what is the purpose of step 1? Also, is there a single on/off for autocorrect or do I deselect all the choices in options?
 
Autocorrect can sometimes screw things up if you are renaming things to something you delete (it can screw other things up too, so it isn't all that nice at times).

So, under Tools > Options you just uncheck the TRACK NAME AUTOCORRECT INFO checkbox and that turns it off.
 

Users who are viewing this thread

Back
Top Bottom