LoadCollection method
To retrieve table data by invoking a custom load IDO method remotely, at a specific
target site, use the LoadCollection method.
The return value type of this method is Mongoose.IDO.Protocol.LoadCollectionResponseData.
You can use this method only if the replication interval type is Transactional. If you attempt to use a Delayed Replication interval type, the system throws an error.
Parameters required by this method
To be used correctly, these are the parameters that this method requires:
Parameter | Data Type | Description |
---|---|---|
Target Site | System.String | This is the name of the site where the IDO method is to be called. |
Request | Mongoose.IDO.Protocol.LoadCollectionRequestData Properties required to be provided with value:
|
This is the request for the data to be returned from the custom load method
being invoked for a specific IDO:
|
This example instantiates the classes required to retrieve data from a remote method LoadCollection request and then returns a data result set:
var targetSite = "CA"; var arg1 = "New_"; //Instantiate a LoadCollectionRequestData class; var request = new LoadCollectionRequestData(); //Instantiate a PropertyList class and //add the properties mapped with the result set of the custom load method. var propList = new PropertyList(); propList.Add( "Name" ); propList.Add( "Description" ); //Specify the IDO name. request.IDOName = "Products"; //Specify the PropertyList created request.PropertyList = propList; //Instantiate an InvokeParameterList class and //add the arguments to be passed in the custom load method's parameters. var paramList = new InvokeParameterList(); paramList.Add( arg1 ); //Provide the custom load method name and the InvokeParameterList. request.CustomLoadMethod = new CustomLoadMethod() { Name = "GetProductInfo", Parameters = paramList }; //Call the custom load method into the specified target site and //return a LoadCollectionResponseData which contains the result set returned by the custom load method. var response = RemoteMethod.LoadCollection( targetSite, request );