Original title:
LLBLGen Typedview parameters giving error "The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100".
-- Otis
Hi,
I am using LLBLgen2.0 version in my web application & the mode is selfserving.
We have a method called getPrimaryMembers in our application.Whenever we call this method its throwing an error:
"The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Too many parameters were provided in this RPC request. The maximum is 2100."
I have pasted the coding here.
public PeerGroupMembersViewTypedView getPrimaryMembers(string peerGroupId, string[] years)
{
PeerGroupPrimarySecondaryMembersViewTypedView objPrimary = null;
PeerGroupMembersViewTypedView objPMembers = null;
try
{
//Resetting the CommandTimeOut
DbUtils.CommandTimeOut = CDMS.COMMON.StaticMembers.CommandTimeout;
objPrimary = new PeerGroupPrimarySecondaryMembersViewTypedView();
IPredicateExpression objFilterExp = new PredicateExpression();
objFilterExp.Add(PeerGroupPrimarySecondaryMembersViewFields.PeerGroupId == peerGroupId);
objFilterExp.AddWithAnd(PeerGroupPrimarySecondaryMembersViewFields.FlagPgmember == 1);
objFilterExp.AddWithAnd(PeerGroupPrimarySecondaryMembersViewFields.Year == years);
ISortExpression sortExp = new SortExpression(PeerGroupPrimarySecondaryMembersViewFields.EntityId | SortOperator.Ascending);
objPrimary.Fill(0, sortExp, false, objFilterExp);
objPMembers = new PeerGroupMembersViewTypedView();
ArrayList objEntityId = new ArrayList();
if (objPrimary.Rows.Count > 0)
{
for (int i = 0; i < objPrimary.Rows.Count; i++)
objEntityId.Add(objPrimary[i].EntityId);
}
else
objEntityId.Add(null);
objFilterExp = new PredicateExpression();
objFilterExp.Add(PeerGroupMembersViewFields.EntityId == objEntityId);
//objEntityId is the arraylist which have more than 3000 members..
//for example 1,2,3....3000 like that
sortExp = new SortExpression(PeerGroupMembersViewFields.EntityId | SortOperator.Ascending);
objPMembers.Fill(0, sortExp, false, objFilterExp);
//Here we get the error what we gave the title of this thread.
return objPMembers;
}
catch (Exception ex)
{
CDMS.COMMON.ExceptionLog.Log.Error(ex.Message, ex);
throw ex;
}
Please suggest us how to avoid this error..
Thanks in advance,
Bala