- Code: Select all Expand view RUN
if msgyesno("Bereken het verschil tussen Bruto en New Bruto")
if webshop->(flock())
FOR I = 1 TO LEN(oBRWT2:aSELECTED)
webshop->(dbgoto(oBRWT2:aSELECTED[I]))
replace webshop->new_diff with (((webshop->new_bruto-webshop->bruto)/webshop->bruto)*100)
next
webshop->(dbunlock())
endif
endif
and afther some post of Mr. Rao I went to : Using Xbrowse DATA
- Code: Select all Expand view RUN
if msgyesno("Bereken het verschil tussen Bruto en New Bruto")
FOR I = 1 TO LEN(oBRWT2:aSELECTED)
webshop->(dbgoto(oBRWT2:aSELECTED[I]))
oBrwT2:supertxt:varput(arttemp->foldertxt)
next
endif
Some questions :
In case of 1000 selected record, code A will do a FLock and code B will use Xbrowse and I suppose a RLock each record. Better use A for large selections ?
In case that changing a value in the loop that will also change a other value based on the changed value, in Code A we need to program it but in Code B Xbrowse will handle also the change in other field, so less code
In large selections, It seems that code A can freeze ? (or just bad coding ) How can I show a Timer or visual reccount in Xbrowse (Somewhere in footer ?)
I use this a lot !!! but i learned about oDbf or Hashes
replace webshop->new_diff with (((webshop->new_bruto-webshop->bruto)/webshop->bruto)*100)
This will go to the DBF and take new_bruto, than bruto etc... Will it always effectively read the dbf or take the buffer data ?
Best option for this kind of process ? oDbf or Hash ?
This will give me some idea of updating some program code. Thanks.