PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → HFSQL Error in prefilled Listview FOR EACH
HFSQL Error in prefilled Listview FOR EACH
Iniciado por Sebastian Arnold, 01,jul. 2016 13:26 - 1 respuesta
Miembro registrado
102 mensajes
Publicado el 01,julio 2016 - 13:26
I have a ListView prefilled with values with ListAdd() and gLink() like this:

ListAdd(LSV_ziel,"Immer"+gLink("immer"),IMG_Lieferant)


When I try to list all the selected values like this

FOR EACH LSV_ziel
i++
IF LSV_ziel[i]..Selected THEN
Trace(LSV_ziel[i])
END
END


I get this error:





HFSQL security mechanism was triggered while browsing the '2' file on the '' item. The <2> data source ist not initialized.

I certainly don't have a '2' file and for shure there are no empty items.
The LSV is not linked to any file. I get this error right after FOR EACH LSV_ziel.

Any ideas?

TIA
Sebastian

--
http://arnoldconsult.de
WinDev 20 with Oracle, WinDevMobile Android Apps and Motorola Windows CE Mobile Barcode Scanners, Python 3 with Oracle and MySQL
Miembro registrado
102 mensajes
Publicado el 04,julio 2016 - 12:42
I can answer this by myself.

This error will always be displayed if you try to loop through a Listview with FOR EACH.

Instead you should use

nLen is int = ListCount( LSV_ziel )
FOR i = 1 TO nAnz
IF LSV_ziel[i]..Selected THEN
Trace(LSV_ziel[i])
END
NEXT


--
http://arnoldconsult.de
WinDev 21 with Oracle, WinDevMobile Android Apps and Motorola Windows CE Mobile Barcode Scanners, Python 3 with Oracle and MySQL