Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress bar with DBFCDX indexes

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
621
GB
I have a utility which reindexes a whole bunch of tables. When I used DBFNTX I used to display a progress bar

INDEX ON Accno+DTOS(DATE)+MyRef TO MyFile1.NTX EVAL ShowProg("MyFile") EVERY 20

ShowProg() would then do some sums and display a progress bar.

Now that I am using DBFCDX, I say :

INDEX ON Accno+DTOS(DATE)+MyRef TAG MyIdx1 TO MyFile EVAL ShowProg("MyFile") EVERY 20

This does not work, because I believe that the EVAL clause is not being executed. Has anyone tried this, and is there a work-around?

Thanks

 
You didn't share the code for ShowProg(), could this be the cause?

Code:
4.5  DBFCDX Driver note
   
   EVAL and EVERY clauses of the INDEX ON command
   
   The EVAL clause functions differently in the DBFCDX driver than it
   does in other RDDs.  The EVAL block is evaluated at the beginning
   and at the end of each indexing process as well as at each record
   as in other RDDs.  At the beginning of the index process both
   BOF() and EOF() are true (.T.).  At the end of the indexing
   process only EOF() is true (.T.).
Ref:

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Thank you both for your suggestions

In fact the fault was mine. The EVAL function was being called. It was just that the time spent opening and closing the indexes was large compared to the time processing the records (these were fairly small tables), so the progress bar always seemed to be at 0% or 100%.

Sorry for the false alarm. Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top