[DUG] Cant convert varianttypecastError to OleStr

Phil Scadden p.scadden at gns.cri.nz
Fri May 19 13:55:39 NZST 2006


> Do you have Variants in the uses clause?

Yes.

> Otherwise, not sure but I know that there are issues when using
> VarArrayCreate Routine (which you are not *directly *doing) with "The
> element type of the array, given by the VarType parameter, is a variant
> type code. This must be one of the constants defined in the System unit.
> It cannot include the varArray or varByRef bits. The element type cannot
> be varString or a custom Variant type. To create a variant array of
> strings use the varOleStr type code. "

Hmm. varDate is a permitted type which I presume TDatetime would
map to okay,

----------------------------------------------------------
Phil Scadden, Institute of Geological and Nuclear Sciences
764 Cumberland St, Private Bag 1930, Dunedin, New Zealand
Ph +64 3 4799663, fax +64 3 477 5232



More information about the Delphi mailing list