Duplicate Value in Index/Primary Key Error 
Author Message
 Duplicate Value in Index/Primary Key Error


[Using Access 95, Jet 3.0]

I developed a muilt-user app in  Access 2/Jet 2.5 and converted up to '95
(Not my choice !!) and Jet 3.0.

I started getting a duplicate value in index error when adding new records
via an rs.AddNew ... rs.Update. The trouble is the primary key is an
Autonumber (Increment) field and there are no other indexes in the table.

I implemented explicit transactions as per the on-line help as I thought it
would be something to do with the cacheing of implicit transactions but
though it may have reduced the number of times this occurs, it certainly
hasn't got rid of it.

I've read a long thread about problems with duplicates in primary keys and
autonumber fields but am unsure of the latest status of the issue. Can
anyone update me please.

Also with regard workarounds, what's the best way
1. Take control of the autonumbering away from Access and do it myself
2. Change the rs.Addnew... rs.UPDATE to a parameter query (I think this is
my preferred change at the moment - but don't know for sure whether this
will get round the problem)
3. Downgrade to Jet2.X
4. Any other option (Access 95 is a given, unfortunately and upsizing to SQL
Server is not an option)

Many thanks


Thu, 04 Oct 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Trap duplicate value error in primary key

2. Trap duplicate value error in primary key relationship

3. Duplicate Value in primary key - problem

4. Primary key duplicate error

5. Primary key duplicate error

6. Duplicate value in index Error

7. Joined Primary Key in Foxpro (Make 1 Primary Key from 2 fields)

8. Primary Key Duplicate

9. Primary Key Duplicates?

10. duplicating primary key

11. Indexes - Primary key naming conventions

12. Primary Key - Index Problem.


Powered by phpBB® Forum Software