Information générale
Catégorie:
Codage, syntaxe et commandes
Robert, the way I update the progress bar assumes that I know how many records I will be appending before I start. When appending an SDF file, I simply FOPENed the file, checked the size, and divided by the record length to find out how many recs I was going to append. The value is stored in lnRecords in this example. Also, in this example I am appending to an empty cursor. You would need to modify the logic in the routine that does the updating so that you don't factor pre-existing records in your table into the thermometer update.
Let me know if you are still have trouble. I am leaving for DevCon on Saturday, but I will be able to help you up until Friday afternoon.
* Update a thermometer during the append process
THISFORM.shpPayrollProg.SetRange(1, m.lnRecords)
* Load the ADP data - the FOR clause is used to update
* the progress thermometer
SELECT DRH116
cForClause = 'THISFORM.UpdPayrollTherm()'
APPEND FROM (m.lcADPData) TYPE SDF FOR &cForClause
* Here is the code in THISFORM.UpdPayrollTherm()
* Update after every 20 records
IF MOD(RECNO('DRH116'), 20) = 0
THISFORM.shpPayrollProg.Update(RECNO('DRH116'))
ENDIF
RETURN .T.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement