Subject Conversion error, when using locate on a datetime field in D2009
Author Adrian Wreyford
Hello Jason,

I'm getting a EvariantTypeCastError: 'Could not convert variant of type (UnicodeString) into type (Double), when using locate.

The error is thrown in IB_Components.TIB_Column.SetAsVariant()

See image attached: Conversion Error.jpg

The Call Stack, has been included, see Conversion Error_Call Stack.jpg

The offending line of code in my application:
IF DM.IB_QuerySubWEIGHTS.Locate('WEIGHTDATE',ConvertWLDTtoDelphiDT(FieldList.Items[1]),[])then //check if DateTime for Animal exists

ConvertWLDTtoDelphiDT simply correctly parses a WindowsMobile device DateTimeStamp:
The actual string passed = '2008/09/28 20:18:20'


Adrian Wreyford

[Non-text portions of this message have been removed]