PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → HExecuteSQLQuery Result [WD22]
HExecuteSQLQuery Result [WD22]
Iniciado por guest, 26,oct. 2017 11:13 - 2 respuestas
Publicado el 26,octubre 2017 - 11:13
Hello,

Im using HExecuteSQLQuery to create Dynamic queries eg.


THEANALYTICNAME = Total_Charges


HExecuteSQLQuery(CustomerQry, "SELECT " + THEANALYTICNAME +" FROM " ...

the THEANALYTICNAME is the dynamic part, the query all works fine but i cant read the result

res = CustomerQry.THEANALYTICNAME

shows an error saying THEANALYTICNAME is not part of the query.

Ive tried res = CustomerQry +"."+ {THEANALYTICNAME,indItem}

but no joy

anyone know a solution to this?

cheers ISO
Publicado el 26,octubre 2017 - 11:22
Hey ISO,

Your indirection usage is wrong at first sight.
Use "res = {CustomerQry +"."+ THEANALYTICNAME,indItem}" instead.

Cheers,

Peter H.
Publicado el 26,octubre 2017 - 11:34
Perfect many thanks Peter.

:spos: