Board index » delphi » How to use Table.Locate method for more than one fields search
jinglan wang
![]() Delphi Developer |
Sat, 09 Jan 1999 03:00:00 GMT
How to use Table.Locate method for more than one fields search'KeyValues is a variant specifying the field value to match, or an array of field values, if I want to search two fields values and I have tried that Table.Locate('FieldName1;FieldName2', [FieldValue1, FieldValue2], [loPartialKey]); where FieldValue1, FieldValue2 are two string value. After compile, I got error messages as follow: Error: Ordinal type required. I also tried that Table.Locate('FieldName1;FieldName2', vArray, [loPartialKey]); where vArray : array[1..2] of string; vArray[1]:=FieldValue1, vArray[2]:=FieldValue2 After compile, I got error messages as follow: Error: Incompatible types: 'Variant' and 'Array'. What is the exact syntex of the 'locate' method for searching more than one fields. Please, help! ---Jinglan Wang |