#1 Today 11:18:13

koraycayiroglu
Member
Registered: 2017-02-03
Posts: 89

VariantToInteger does not convert OleVariant to integer

Hi,

I am working with xml nodes and when assigning some values from xml to record i use mormot's functions obviously but it seems variant conversions does not work with OleStr or OleVariant types. Value is something like '688' and there is no case for OleStr so it will use SetVarDataUnRefSimpleValue which returns false.

This is not a major problem or anything, it just catch my eye and want you to know.

Best regards.

Last edited by koraycayiroglu (Today 11:19:24)

Offline

#2 Today 12:14:42

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,491
Website

Re: VariantToInteger does not convert OleVariant to integer

SetVariantUnRefSimpleValue() only supports "simple" types, as documented and stated by its name.

WideString / BSTR are properly handled as varOleStr in mORMot code but not by this SetVariantUnRefSimpleValue() function for sure.

OleVariant could mean anything.
What does OleVariant mean  in your case?
Where is SetVariantUnRefSimpleValue() called in your code?

Offline

Board footer

Powered by FluxBB