The "Edit"-method and an indexed, primary and unique field

The "Edit"-method and an indexed, primary and unique field

Post by àV » Mon, 11 Oct 1999 04:00:00



I have been developing a databaseapp. in DAO and it works well - except in
one situation.

I have an indexed primary and unique field in the database
When I use "data1.edit" and edit the record (not the indexed field) and save
it by using "data1.update", I get the errormessage no.3022, saying that I
can't duplicate an indexed, unique field.

The first record in the database works OK, but when I get to no. 2,3,etc, I
get the errormessage.

Kind regards
Carsten Jensen

 
 
 

The "Edit"-method and an indexed, primary and unique field

Post by Tim Fergus » Mon, 11 Oct 1999 04:00:00



Quote:>I get the errormessage no.3022, saying that I
>can't duplicate an indexed, unique field.

This means that a field in your table that has a unique index, and
your new record contains a value that already exists in the table in
the same field. Unfortunately, it does not say which field and you may
have inadvertently assigned a unique index to a field you shouldn't
have.

Check your table design very carefully -- the quickest way is View ->
Indexes in the table design window.

Check your data -- do you really have different values in each row?
Unfortunately, in Access "unique" is case-insensitive and there's
nothing you can do about that.

HTH

Tim F

--


 
 
 

1. The "Edit"-method and an idexed, primary and unique field

I have been developing a databaseapp. in DAO and it works well - except in
one situation.

I have an indexed, primary and unique field in the database.

When I use the "data1.edit" and edit the record (not the indexed field) and
save it by using "data1.update", I get the errormessage no. 3022, saying
that I can't duplicate an indexed, unique field.

The first record in the database works OK, but when I get to no. 2,3, etc, I
get the errormessage 3022.

Kind regards
Carsten Jensen

2. SQL*NET:Listener refuses connection, please help!

3. How to make a "decimal"-field to an "integer"-field

4. Need low-cost db with SQL & more...

5. bug in "create unique index"

6. UniData users wanted

7. dBase "Unique" Index Problem

8. Counting Filled Fields

9. "Unique Day" in a datetime field

10. "Primary" keyword in Primary Key declaration

11. aReport."Field".SetFilter("this")?

12. max of ("...","...","..")

13. Error: "Field Index Out Of Range"