Thanks Cetin. That's what I was thinking, but I was hoping there was something easier. Actually, a neat feature for the wishlist, IMO, would be something like COUNT FOR MODIFIED.
As a side bar, you're right, this will make the update take a bit longer but one thing I've noted over the years is that in software speed is entirely based on perception. i.e. doing the loop to count modified records and then updating them while incrementing a progress bar will physically take longer than just updating, but perceptively it appears faster because things are happening on the screen.
Thanx
>>I have a view set to Optimistic Table buffering that I run a calc routine on modifying at least 300+ records. The TABLEUPDATE() takes on average 10+ seconds so I want to display a progress bar so the user knows something is actually happening and how far along it is. This leads me to 2 questions:
>>
>>1. Is there a way to show the progress of a TABLEUPDATE(1,.T.) ?
>>
>>2. Is there a way to find out how many records where modified/appended? If so, I could use this count and GETNEXTMODIFIED() to update a progress bar.
>>
>>TIA
>Colin,
>You could provide that with getnextmodified but also that would have some time impact :
>nRec = getnextmodified(0)
>nTotal = 0
>do while nRec != 0
> nRec = getnextmodified(nRec)
> nTotal = nTotal + 1
>enddo
>* Progbar max = nTotal
>nRec = getnextmodified(0)
>*nEdited = 0
>*nAppended = 0
>do while nRec != 0
> if nRec < 0
>* nAppended = nappended + 1
>* Do whatever with appended
> else
>* nEdited = nEdited + 1
>* Do whatever with edited
> endif
>* progbar value = value + 1
> nRec = getnextmodified(nRec)
>enddo
Cetin
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada
cmagee@metroland.comNever mistake having a career with having a life.