cannot access field "MyField" as type float
Posted: Tue 14 Aug 2018 07:53
VirsualQuery.fieldByName('MyField').ascurrency cause the error
cannot access field "MyField" as type float
the source of virsualQuery is TVirtualTable with field "MyField" of Currency Type
to reproduce the error :
>>> put TVirtualTable and TvirsualQuery on the form and link the virsualQuery with Virsualtable
>>> define New Field "MyField" of Type Currency in Virsualtable
>>> select "Myfield" and try to access it as Currency "select MyField form Virsualtable" >> VirsualQuery.fieldByName('MyField').ascurrency
i can access it as String >>> VirsualQuery.fieldByName('MyField').asstring
Thanks,
Ahmed
cannot access field "MyField" as type float
the source of virsualQuery is TVirtualTable with field "MyField" of Currency Type
to reproduce the error :
>>> put TVirtualTable and TvirsualQuery on the form and link the virsualQuery with Virsualtable
>>> define New Field "MyField" of Type Currency in Virsualtable
>>> select "Myfield" and try to access it as Currency "select MyField form Virsualtable" >> VirsualQuery.fieldByName('MyField').ascurrency
i can access it as String >>> VirsualQuery.fieldByName('MyField').asstring
Thanks,
Ahmed