David (or Piter)
Thanks for the reply. Actually, I was looking for the way to show Progress Bar while appending from the text file (not from a database).
Anyway, thanks a lot for your idea. I'll try to implement it.
Thanks.
>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.
>___________________________________
If it's not broken, fix it until it is.
My Blog