I found out that a kind of „recordset” approach - oLbx with ARRAY - works much faster than using the database.
Are you aware of advantages / disadvantages of using ARRAYS.
Thanks in advance
Otto
With ARRAY (much faster)
- Code: Select all Expand view
- do while .not. eof()
aadd(arr1,{ str(RECHNUNG->menge),str(RECHNUNG->vmenge), RECHNUNG->bezeichnun,str(RECHNUNG->Wert )})
skip
enddo
@ 0, 0 LISTBOX oBrwRG ;
FIELDS "", "" ,"","";
HEADERS "ME", "VMe", "Bezeichnung","Preis" ;
SIZE 240, 195 PIXEL OF oWndRG
oBrwRG:bLine = { || { arr1[oBrwRG:nAt,1], arr1[oBrwRG:nAt,2], arr1[oBrwRG:nAt,3], arr1[oBrwRG:nAt,4] } }
oBrwRG:SetArray( arr1 )
Database:
select RECHNUNG
go top
@ 0, 0 LISTBOX oBrwRG ;
FIELDS ALLTRIM(str(RECHNUNG->menge-RECHNUNG->vmenge)),ALLTRIM(str(RECHNUNG->vmenge)), RECHNUNG->bezeichnun,str(RECHNUNG->Wert);
HEADERS "ME", "VMe", "Bezeichnung","Preis";
ALIAS "RECHNUNG";
fieldsizes 30,30,110,30;
SIZE 240, 195 OF oWndRG
SELECT RECHNUNG->AKTIV FOR " " TO " "
Best regards,
Otto