Table.Locate options for multiple field searches
Hello fellow experts,
I am having some trouble setting the proper options in a table.locate
method. I have done locates
before with single field with no problem. However, I am now trying to
search a table based on
multiple fields and I am having trouble with the parameters.
I am using delphi 2.
I have a table, let's call it table1, with fields : f1,f2,f3,f4,f5 (for
I am searching on f1 and f2, which are both A fields (string). I am looking
for the values
'Val1' and 'VAL2' in these two fields/columns in the table.
I do the following:
table.locate('f1;f2',['VAL1','VAL2'],) I get the compile error
"Ordinal type required'
I try this
table.locate('f1;f2','VAL1;VAL2',) which compiles fine but when
during runtime I get the error
"variant is not an
I have tried other combination but to no avail.
Can any one help? I know I probably have the fundamentals wrong.
Thanks in advance,