
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