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
Re: cannot access field "MyField" as type float
Please test the described behavior using the latest version of VirtualDAC 10.4.10 (13-Jul-2018). If the error is reproduced on this version of VirtualDAC, please compose and send us the source code of the test sample, execution of which causes the issue. This can be done using the e-support form https://www.devart.com/company/contactform.html
Re: cannot access field "MyField" as type float
what is the version Included within Unidac 7.3.9?
Re: cannot access field "MyField" as type float
UniDAC 7.3.9 includes VirtualDAC 10.4.10
Re: cannot access field "MyField" as type float
Okey, so i am working with the latest version
To be more Precise :
i can access it as currency when the query is
select MyCurrencyField from VirtualTable
and can not when i use Coalesce or Sum, that is
select Coalesce(MyCurrencyField,0) as MyCurrencyField from VirtualTable
or
select Sum(MyCurrencyField) as MyCurrencyField from VirtualTable
is that make sense ?if no i can send you the Units
To be more Precise :
i can access it as currency when the query is
select MyCurrencyField from VirtualTable
and can not when i use Coalesce or Sum, that is
select Coalesce(MyCurrencyField,0) as MyCurrencyField from VirtualTable
or
select Sum(MyCurrencyField) as MyCurrencyField from VirtualTable
is that make sense ?if no i can send you the Units
Re: cannot access field "MyField" as type float
We reproduced the issue and fixed this error. The fix will be included in the next VirtualDAC build. As a workaround, we can send you a night VirtualDAC build including the required changes. For this, using e-support form ( https://www.devart.com/company/contactform.html ) provide us with your license number and IDE version you are interested in