dBase Unique indexes: No failure on duplicate insert 
Author Message
 dBase Unique indexes: No failure on duplicate insert

Quote:

>I'm using dBase IV DBF files to maintain data. I have two indexes (in
>one MDX) on each table, both UNIQUE.
>In my form, using the unique index, if I add a record that already
>exists, the POST succeeds and then neither record is available any
>longer. The BDE shows the duplicates, however.

That's a feature of dBase, meaning that if you set order to that
unique index, you will only see one record for each index-key. If you
don't use the index, you will see all records.

There are lots of other indexing methods in dBase (what about
conditional indexes?), but you have to be very aware of their
consequences...

Quote:
>Any suggestions how to get the unique index to help prevent duplicates
>in dBase? Or do I have to do manual validation myself?

I'm afraid so. In dBase, that is...

Jasper

PS: please take into consideration
- when replying, I just think I know;
- when asking, be sure that I don't.



Sat, 19 Sep 1998 03:00:00 GMT  
 dBase Unique indexes: No failure on duplicate insert

Quote:

>I'm using dBase IV DBF files to maintain data. I have two indexes (in
>one MDX) on each table, both UNIQUE.
>In my form, using the unique index, if I add a record that already
>exists, the POST succeeds and then neither record is available any
>longer. The BDE shows the duplicates, however.
>I hear Paradox unique indexes prevent adding duplicates. But I have to
>use dBase for its ability to maintain multiple indexes within a form
>(the BDE documentation says it only maintains Paradox primary
>indexes).
>Any suggestions how to get the unique index to help prevent duplicates
>in dBase? Or do I have to do manual validation myself?

You need to validate yourself.  A unique index in dBase indexes only
the first occurence of a key and ignores following matches.
Duplicates are permitted in the DBF File but will be ignored in the
index if the key already exists.  


Mon, 21 Sep 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Duplicate key inserted with dBase Unique index

2. DBase Unique Index

3. unique index in dBase

4. dBase "Unique" Index Problem

5. DBASE Unique Index

6. DBase Table - unique Index

7. Read Failure when Insert

8. Unique table inserts---need help...

9. How to check Unique Key in Insert ?

10. Write failure with dBase files

11. SQL insert and get an unique ID back

12. Duplicate Error on insert record

 

 
Powered by phpBB® Forum Software