dBase "Unique" Index Problem

dBase "Unique" Index Problem

Post by Eric Dura » Sun, 31 Dec 1899 09:00:00

Hi, all.

Have a dBase "Unique" index question:

I'm having a problem with one of my index files.  I'm using dBase tables
(.DBF, .DBT, .MDX) and have one of three indexes (all in a .mdx file)
on a date field using the "unique" and "maintained" selections.

After adding a record, which includes a date, I go to a "search" form where
display the dates (DBLookupListBox) using the unique index (DATEUNIQ) to
the user to select the dates to search (start date, end date).  In the form
have the DATEUNIQ selected and then I open the table.  The component
the dates ok (unique) but the last, and latest, date is NOT displayed.  

Do I have to put something in the form that adds the records (now using
then post) to make sure the index's are indexed properly??

I start the "add" form like so:


Then later after making entries ("finished" button pressed):


Do I have to "open" the index files too??  I have selected "maintained" in
of them when setting them up.

The "search" module opens like so:

DataModule1.Table1.IndexName := 'DATEUNIQ';

When I change the indexname to another index that shows all the dates, it
shows ALL the dates (properly indexed) including the newly added records.
I only want to show the "unique" dates to keep the DBLookupListBox from
becoming crowded.

Can anyone shed some light on this for me??

Thanks in Advance!

Eric Duran, sysop, CMPD_BBS



1. bug in "create unique index"

when creating a index unique in a table that accept nulls the unique
constraint doesn't work.

create table test_unique(i1 integer, i2 integer, unique(i1,i2);
insert into test_unique(1,null);
insert into test_unique(1,null);
insert into test_unique(1,null);
all "inserts" above insert sucefully.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command

2. DB2/UDB NT-Unix FP: update on-line documentation?

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

4. Select Statement in OpenRecordset

5. Dbase "Index not found" error

6. Creating Stored Procedures

7. dBase III "Index not found" error

8. DAO 3.5 and HTTP access to a database

9. "Unique Table" problem

10. Problem with "Unique Table" Property

11. "unique" violation problem

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

13. "INVALID DESCRIPTOR INDEX" problem again