Another test with FW_DbfToArray

Another test with FW_DbfToArray

Postby Silvio.Falconi » Sat Jul 20, 2019 4:36 pm

then the test helped from Uwe on this topic

http://forums.fivetechsupport.com/viewtopic.php?f=3&t=37464#p223944

I thinked to not delete the records but add a new field TACANCEL to set wich record i can delete on second time
because then must be seen by final user before to delete
so, after saved the records I wanted create an array for only records having oTariffe:TACANCEL=.F.

if I make
Code: Select all  Expand view
local cFieldList :="TATIPO,TAELEMENTO,TADESCELEM,TASERVIZIO,TADESCSERV,TASERVSTRU,TASETTORE,TAGIORNI,TADATEINI,TADATEFIN,TACOSTO,TASCONTO,TALISTINO,TABLOCCATO,TATARIFFA,TATOTALE,TACANCEL"

 atemp:=oTariffe:FW_DbfToArray( cFieldList, { || oTariffe:TACANCEL=.F.  } )



the procedure not run ok, so on atemp array the procedure insert all records of Tariffe.dbf


then I try the same with the old method

Code: Select all  Expand view
 

DO WHILE !oTariffe:EOF()
        IF oTariffe:TACANCEL=.F.
         AaDd(atemp, {  oTariffe:TaTipo     ,;
                         oTariffe:TaElemento ,;
                         oTariffe:TaDescElem ,;
                         oTariffe:TaServizio ,;
                         oTariffe:TaDescServ ,;
                         oTariffe:TaServStru ,;
                         oTariffe:TaSettore  ,;
                         oTariffe:TaGiorni   ,;
                         oTariffe:TaDateIni  ,;
                         oTariffe:TaDateFin  ,;
                         oTariffe:TaCosto    ,;
                         oTariffe:TaSconto   ,;
                         oTariffe:TaListino  ,;
                         oTariffe:TaBloccato ,;
                         oTariffe:TaTariffa  ,;
                         oTariffe:TaTotale,oTariffe:TACANCEL   }  )
           ENDIF
        oTariffe:Skip()
     ENDDO
    oTariffe:close()
 




and finally on aTemp is showed the records I wish be showed

Image


but in me there remains the desire to understand why with FW_DbfToArray it didn't work as I wanted it to do
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 59 guests