You are not logged in.
Pages: 1
Hi,
Has anybody come across this error before: EVariantTypeCastError : could not convert variant of type (UnicodeString) into type (Double)? I get this error when calling
JSONToDataset with this JSON string:
'[{"folio_id":11111,"folio_name":"testfolio 1","startDate":"2013-01-01","closedDate":"2013-01-02","description":null,"startCapital":null,"endCapital":null,"RiskValue":null},
{"folio_id":22222,"folio_name":"testfolio 2","startDate":"2013-01-01","closedDate":null,"description":null,"startCapital":null,"endCapital":null,"RiskValue":null}]'
Whereas with this JSON the error is not raised:
'[{"folio_id":11111,"folio_name":"testfolio 1","startDate":"2013-01-01","closedDate":null,"description":null,"startCapital":null,"endCapital":null,"RiskValue":null},
{"folio_id":22222,"folio_name":"testfolio 2","startDate":"2013-01-01","closedDate":null,"description":null,"startCapital":null,"endCapital":null,"RiskValue":null}]'
The only difference between the two JSON strings is "closedDate":"2013-01-02" and "closedDate":null. The error is raised when converting a to a DateTime field.
I am using the latest version of mORMot.
Regards,
Wai
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
Should be fixed by http://synopse.info/fossil/info/d3c6af3208
Offline
That did the trick.
Kudos for the fast response ...
Last edited by wai-kit (2013-04-17 07:43:29)
fpcdeluxe, FPC 3.2 / Lazarus 2.0, mORMot on Windows 10 ...
Offline
Pages: 1