Are you sure that SalePrice is not NULL, and that Locate is therefore returning NULL?
Bob > > From: [EMAIL PROTECTED] > Date: 2003/07/24 Thu AM 11:09:00 GMT+12:00 > To: Multiple recipients of list delphi <[EMAIL PROTECTED]> > 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/
