Dbase III database with indexes 
Author Message
 Dbase III database with indexes

i have to access a large (500 mb) database with three index files. I
have not been able to use more than one index at a time. Can I use all
three at a time? Also, everytime I use the seek method with an index, it
starts at the beginning of the file and finds the FIRST record
corresponding to my index value. What if there are several records with
the same index value and I need them all? Can I skip a record? Using

Thank you

Carole Alsharabati



Fri, 08 Dec 2000 03:00:00 GMT  
 Dbase III database with indexes

Hi Low, thanx for your email yesterday
I couldn't reply because your email address seems to be invalid.
Also :
I'am from Holland so pardom my grammer.

The seek Method (in vb or clipper) always goes to the first match.
From there on, (if I think that is what you want to do)
keep skipping the database until the seerchstring and the recordname
don't match anymore
I'am very new with vb so in clipper style
in clipper it would be:

local searchstring           //what do you seek ? , same as dim

if database->(dbseek("searchstring") = true
   do while database->recordvalue == searchstring
      // ..... here you do what you want to do, make a list or append to
other dbase
        database->(dbskip())   //dbase.recordset.movenext in VB
   enddo
else
     print "no match found"
endif

This should be very fast since you skip the database until foundstring
<> database->recordvalue, then it stops, and you have all your matches

Note:
Your Index HAS to be on the recordset that you are searching in, if not
create a temp index
You could do it like that.
Also not that seek in vb you can make the seek start at the bottom if
you set it to
"<="

I managed to get the indexes right also today (there was some
clippercode in the index file and VB doesn't like that :) )
But you can use UPPER(CUSTOMER)+UPPER(CUSTNUMBER) for example
as long as I created the index with foxpro (.cdx) indexes and not with
VB

Best regards
Jacob

Quote:

> i have to access a large (500 mb) database with three index files. I
> have not been able to use more than one index at a time. Can I use all

> three at a time? Also, everytime I use the seek method with an index,
> it
> starts at the beginning of the file and finds the FIRST record
> corresponding to my index value. What if there are several records
> with
> the same index value and I need them all? Can I skip a record? Using

> Thank you

> Carole Alsharabati



Sat, 09 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using DBase III index in VB5

2. Question on dBASE III and indexes

3. VB4.0 16-bit using dBase III Indexes

4. dBASE III indexes

5. dBASE III/IV & FoxPro Index files

6. Indexing atached dBase III tables

7. dBase III Index and VB4

8. Using indexes with dBase III

9. dBASE III indexes

10. Problem writing to a Dbase III table and updating the indexes

11. Rebuild dBase III indexes from VB

12. Please Help!!!! Trouble creating/using dbase III indexes

 

 
Powered by phpBB® Forum Software