locate command on Xdatawebdataset

How do I perform locate on multiple keys on a xdatawebdataset ?


  if dbBiocide.Locate('Customer_id;Sample_Date',
    VarArrayof([mcustname.Value, mSampleDate.Date])) then
    dbBiocide.edit
  else
    dbBiocide.Append;

It gives VarArrayof is not defined error at compile time. Added System.Variants in the uses clause

You can use it like this:




if dbBiocide.Locate('Customer_id;Sample_Date',
    TJSArray.New([mcustname.Value, mSampleDate.Date])) then
    dbBiocide.edit
  else
    dbBiocide.Append;


TJSArray is declared in unit JS.

I tried this but I am getting an error while compiling 

[Error] InpBasic_Meq.pas(152): Incompatible types: got "array" expected "JSValue"

I'm sorry, this is the correct code:



uses {...}, Types;



var
  Values: TJSValueDynArray;
begin
  Values := [mcustname.Value, mSampleDate.Date];

  if dbBiocide.Locate('Customer_id;Sample_Date', Values, []) then
    dbBiocide.edit
  else
    dbBiocide.Append;