Hello
I am trying to execute a stored procedure from my c# application using the AddCallBack metod from UnitOfWork2.
I am using LLBLGen Pro 3, and VisualStudio 2008.
This is done the following way:
UnitOfWork2 unit = new UnitOfWork2();
unit.AddCallBack(new ActionProcedures.CONTRAT_RECALCULMONTANTSPDRCallBack(ActionProcedures.CONTRAT_RECALCULMONTANTSPDR), PreEntityInsert, false, parameters.ToArray());
IDataAccessAdapter adapter = (IDataAccessAdapter)(new MyDataAccessAdapter());
adapter.CommandTimeOut = 300000;
unit.Commit(adapter, true);
the MyDataAccessAdapter inherits from the DataAccessAdapter.
The commit is executed with errors, and the error message is :
"Parameter count mismatch."
I saw that the error is thrown when in the UnitOfWork2, the followind instructions is executed:
switch(blockToProcess)
{
case UnitOfWorkBlockType.Inserts:
#if !CF
TraceHelper.WriteLineIf(TraceHelper.PersistenceExecutionSwitch.TraceVerbose, "\tHandling Pre Insert CallBacks.");
foreach(UnitOfWorkCallBackElement2 element in _callBacksPreInsert)
{
element.DelegateToCall.DynamicInvoke(ConstructParameters(element.Parameters, adapterToUse, element.PassInAdapter));
}
so, the element.DelegateToCall.DynamicInvoke(ConstructParameters(element.Parameters, adapterToUse, element.PassInAdapter));
throws the exception.
Could you please help