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)
indexed
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
I
display the dates (DBLookupListBox) using the unique index (DATEUNIQ) to
allow
the user to select the dates to search (start date, end date).  In the form
I
have the DATEUNIQ selected and then I open the table.  The component
displays
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
append
then post) to make sure the index's are indexed properly??

I start the "add" form like so:

DataModule1.Table1.Open;
DataModule1.Table1.Append;

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

DataModule1.Table1.Post;

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

The "search" module opens like so:

DataModule1.Table1.IndexName := 'DATEUNIQ';
DataModule1.Table1.Open;

When I change the indexname to another index that shows all the dates, it
then
shows ALL the dates (properly indexed) including the newly added records.
But
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

http://www.mindsync.com/eduran
ftp://cmpd.mindsync.com
PA-Net: 208.135.49.201

 
 
 

1. bug in "create unique index"

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

Example:
---
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