Ok, I was experminting with the prefetches, I have three with one subpath. I tried taking them down to one and running it.
IPrefetchPath2 transactionPrefetch = new PrefetchPath2((int)EntityType.PointTransactionEntity);
//transactionPrefetch.Add(PointTransactionEntity.PrefetchPathAwardee);
transactionPrefetch.Add(PointTransactionEntity.PrefetchPathEventTransaction); //.SubPath.Add(EventTransactionEntity.PrefetchPathEvent);
//transactionPrefetch.Add(PointTransactionEntity.PrefetchPathProgram);
Come to find out the initial prefetch (fetching awardee) is not causing the problem. The problem is being caused second one. However, I have noticed that even with the first, I am still getting the same query type. It is still creating an IN clause.
I also realized that I did not include the stack trace in the exception detail in the first post and that may help in determining whats going on.
The complete exception is:
SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException was unhandled by user code
Message="An exception was caught during the execution of a retrieval query: 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.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception."
Source="SD.LLBLGen.Pro.ORMSupportClasses.NET20"
StackTrace:
at SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior) in c:\RuntimeSource\ORMSupportClasses\RetrievalQuery.cs:line 92
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteMultiRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFactory2 entityFactory, IEntityCollection2 collectionToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo, Boolean allowDuplicates, IValidator validatorToUse, IEntityFields2 fieldsUsedForQuery) in c:\RuntimeSource\ORMSupportClasses\DataAccessAdapterBase.cs:line 597
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollectionInternal(IEntityCollection2 collectionToFill, IRelationPredicateBucket& filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, Int32 pageNumber, Int32 pageSize) in c:\RuntimeSource\ORMSupportClasses\DataAccessAdapterBase.cs:line 3995
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, Int32 pageNumber, Int32 pageSize) in c:\RuntimeSource\ORMSupportClasses\DataAccessAdapterBase.cs:line 2280
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchParameterisedPrefetchPath(IEntityCollection2 rootEntities, Int64 maxNumberOfItemsToReturn, IPrefetchPath2 prefetchPath) in c:\RuntimeSource\ORMSupportClasses\DataAccessAdapterBase.cs:line 4862
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityCollection(IEntityCollection2 collectionToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, IPrefetchPath2 prefetchPath, Int32 pageNumber, Int32 pageSize) in c:\RuntimeSource\ORMSupportClasses\DataAccessAdapterBase.cs:line 2323
at Pointfolio.BusinessLayer.ReportSources.TransactionReportSource.FetchReport(Guid awardeeId, DateTime startDate, DateTime endDate, PointTransactionType transactionType, Int32 pageNumber, Int32 pageSize) in C:\Documents and Settings\jyoung\My Documents\Visual Studio 2005\Projects\Pointfolio_v2\BusinessLayer\ReportSources\TransactionReportSource.cs:line 85
at Pointfolio.BusinessLayer.ReportSources.TransactionReportSource.FetchReport(Guid awardeeId, DateTime startDate, DateTime endDate, PointTransactionType transactionType) in C:\Documents and Settings\jyoung\My Documents\Visual Studio 2005\Projects\Pointfolio_v2\BusinessLayer\ReportSources\TransactionReportSource.cs:line 52
at Forms_Reports_Transactions.ExportReport() in c:\Documents and Settings\jyoung\My Documents\Visual Studio 2005\WebSites\Pointfolio_v2\Forms\Reports\Transactions.aspx.cs:line 139
at Forms_Reports_Transactions.btnDownloadReport_Click(Object sender, EventArgs e) in c:\Documents and Settings\jyoung\My Documents\Visual Studio 2005\WebSites\Pointfolio_v2\Forms\Reports\Transactions.aspx.cs:line 65
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Frans,
I got it running the debug libs like you asked, but the break point does not get hit when the exception occurs.
Edit:
I am currently trying to reproduce it in a test environment. I'll let you know how it goes.