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 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 ).
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’
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.