We usually get this if there is a Null in 1 or more of the fields

Regards
Paul McKenzie
Analyst Programmer
SMSS Ltd.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Thursday, July 24, 2003 11:09 AM
Subject: [DUG]: Invalid Variant Type Conversion


> I am getting an Invalid variant type conversion in the following code:
>
>    ImpSalePrice := SaleRefTable.Lookup(
>       'CustCode;DestCode;PricePoint;SpeciesCode;LogGrade;LogLength',
>       VarArrayOf([pCustCode, pDestCode, pPricePoint, pSpeciesCode,
pLogGrade,
>       pLogLength]), 'SalePrice');
>
> I can't understand it because there is no error with the following:
>
>    if SaleRefTable.Locate(
>       'CustCode;DestCode;PricePoint;SpeciesCode;LogGrade;LogLength',
>       VarArrayOf([pCustCode, pDestCode, pPricePoint, pSpeciesCode,
pLogGrade,
>       pLogLength]), []) then
>
> I have check each of the types in the array and they match those in the
table.  Can
> anyone point me to what is happening here?
>
> TIA
>
> Mark
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to