10.2 Upgrade IceDataContext variable?

Getting the following error on some code after updating to 10.2.

Looks like the ServcieCaller is looking for an IceDataContext variable now. Anyone messed with this yet?

CS7036 There is no argument given that corresponds to the required formal parameter ‘outParams’ of ‘ServiceCaller.Execute(IceDataContext, string, string, NameValueCollection, object[], out object[])’

  // Using this method will not block the thread
	object[] outParam = null;
	Ice.Hosting.ServiceCaller.Execute("Erp:Rpt:SalesOrderAck", "WriteSysTask", new System.Collections.Specialized.NameValueCollection(), new object[]{reportParamRow}, out outParam);

Yes we started requiring you pass thru the ‘Db’ context variable due to DTC issues some versions ago. If in an ERP module, pass thru the ERPContext ‘Db’ variable, in an ICE module, pass the ICEContext ‘Db’ variable. Both derive off the base class you mentioned - IceDataContext.

And yes, the name is poor :slight_smile:

Thanks Bart that did the trick.
code now reads:

`Ice.Hosting.ServiceCaller.Execute(Db, "Erp:Rpt:SalesOrderAck", "WriteSysTask", new System.Collections.Specialized.NameValueCollection(), new object[]{reportParamRow}, out outParam);`
1 Like