Setting DataAdapter.fill parameter on Java/Android

On my server schema the table has a parameter on the where ID_SERIAL = :pSERIAL, I want to pass a value to the pSERIAL when I open (fill ) the DataAdapter on the client.

I think this should be done setting the TableRequestInfo, But I am lost on the sintaxe:
http://wiki.remobjects.com/wiki/TableRequestInfo_Class_(Java)

I got an error here, because I am not sending the parameter:
fDataAccess.DataAdapter.fill(lData.TablePRODUCAO_PRODUTO, new com.remobjects.dataabstract.intf.TableRequestInfo(-1, true, nil );

So, I would like help on java/android, to pass parameters and if possible how to filter data on the client, like “width > 60”, ( width is a table field on my schema ).

Thanks a lot,

José Carlos.

I try this:
var pID: integer := 1145;

var dpArray : com.remobjects.dataabstract.intf.DataParameterArray :=
new com.remobjects.dataabstract.intf.DataParameterArray(array of String([‘pSERIAL’]),
array of Object([pID]));

var lData := new datadata();

fDataAccess.DataAdapter.fill(lData.TablePRODUCAO_PRODUTO, new com.remobjects.dataabstract.intf.TableRequestInfo(-1, false, dpArray ));

On the last line I got this error:
Java.lang.Exception occurred

Message: ‘java.lang.Exception: BinMessage : Unknown or unsupported variant type code’

At:

com.remobjects.dataabstract.RemoteDataAdapter.internalFill

com.remobjects.dataabstract.RemoteDataAdapter.fill

Yes, you’ve found the right API. I’ll investigate the error, and we’ll think about more convenient API (DataParameterArray will be replaced with native java array soon).
Meanwhile, I suggest you to try the following workaroud:

  var pID: Integer := 1145;
  var dpArray := new DataParameterArray();
  dpArray.addItem(new DataParameter('pSERIAL',
                      new com.remobjects.sdk.VariantType(com.remobjects.sdk.VariantTypeCode.varInt32, pID)));

  var lData := new DataData();

  fDataAccess.DataAdapter.fill(lData.TableClients, new com.remobjects.dataabstract.intf.TableRequestInfo(-1, false, dpArray ));

The idea here is to directly define the VariantTypeCode.

It is working now, Thanks!