Information générale
Catégorie:
Codage, syntaxe et commandes
Hello Nadya,
I have come up with a solution that takes virtually no performance hit. It is very similar to some of the previous ideas with a slight twist which enables it to run faster.
Here it is...
**********************************
testtherm.prg:
private nPogress,oTherm
select test2
oTherm = createobj('_thermometer',"Append Test", reccount(), 0)
oTherm.show()
set odometer to 100
select test
append from dbf('test2') for iif(mod(_tally,100)==0,updatetherm(),.T.)
oTherm.Complete()
release oTherm
updatetherm.prg:
oTherm.update(_tally)
**********************************
I found that this runs very fast. This does not address your issue with determining your total record count value, but it does get you a thermometer without killing the speed of the append function. Because you are only running a program every 100 records the speed is greatly increased from running a statement like "append from dbf('test2') for updatetherm()" where your condition is moved into updatetherm and executed for every record.
-Peter
___________________________________
Peter Edwards
Software Engineer
Re:discovery Software Inc.
___________________________________
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