"Invalid variant type conversion"

Hi everyone,

I get
    "Invalid variant type conversion"
on:
    IF
DmCoupling.TblPIA_ID.Locate(CCData.IDFieldList,IDFldData,[loCaseInsensitive]
) THEN
with:
    CCData.IDFieldList = 'Personeelsnummer'
    IDFldData[0] := '78'

Declarations:
   IDFldData         : Variant;
   CCData.IDFieldList: String;

IDFldData was created with
    IDFldData  := VarArrayCreate([0,NKeyFields-1],varVariant);
    where NKeyFields=1
and filled with
    FOR N := 1 TO NKeyFields DO
      BEGIN
        ImpFldCont     := ImpFldData[DBIntNumID[N]];
        IDFldData[N-1] := ImpFldCont;  { string value '78' }
      END; { For all keyfields }

TblPIA_ID points to a table
with key field InternID is an integer.

It looks like the integer and the '78' don't match.
What can I do to prevent this? The VarArrayCreate must contain 'varVariant'
as second parameter, because I do not know beforehand what types
I'm gonna get.

Thanks,
Jan