An IdeaBlade exception is thrown in (non-SilverLight) code when compound primary key contains NULL. We have a simple view on our database with an outer join, and in flagging the fields we thought was a unique key, it turns out that one element could be NULL due to the OUTER clause. This raises an internal exception when the enumerator is fetched. While this is a situation to avoid, it's extremely difficult to identify the cause of the exception, sp perhaps it needs either a check internally so meaningful feedback can be displayed?
Cheers, Jason
var datarows = from datarow in _context.ExportAllResponseDatas where datarow.QuestionnaireVersionId == qversionid && datarow.LastUpdated <= _snapshotTime && (datarow.ResponseState.HasValue && datarow.ResponseState.Value != 1) orderby datarow.ResponseSetID select datarow;
var dataenumerator = datarows.GetEnumerator();
Exception trace is show below.
IdeaBlade.EntityModel.EntityServerException: {"Object reference not set to an instance of an object."}
StackTrace: at IdeaBlade.EntityModel.EntityManager.HandleEntityServerException(Exception ex, Boolean tryToHandle, PersistenceOperation operation, Boolean throwOnError) at IdeaBlade.EntityModel.EntityManager.ExecuteServerQuery(IEntityQuerySurrogate entityQuery) at IdeaBlade.EntityModel.EntityManager.ExecuteFetch(IEntityFinder finder) at IdeaBlade.EntityModel.EntityQueryFinder.Execute() at IdeaBlade.EntityModel.EntityManager.ExecuteQueryCore(IEntityQuery query, Boolean isAsync) at IdeaBlade.EntityModel.EntityManager.ExecuteQuery[T](IEntityQuery`1 query) at IdeaBlade.EntityModel.EntityQueryExtensions.Execute[T](IEntityQuery`1 query) at IdeaBlade.EntityModel.EntityQuery`1.GetEnumerator() at QuestMetrics.QuestServer.DataExportService.DataExporterBase.ExportData(Func`2 progresscallback) in C:\Source\Stuff\DataExporterBase.cs:line 320
InnerException: at IdeaBlade.EntityModel.EntityServerProxy.CheckConnection(Exception e) at IdeaBlade.EntityModel.EntityServerProxy.Fetch(SessionBundle bundle, IEntityQuerySurrogate query) at IdeaBlade.EntityModel.EntityManager.ExecuteServerQuery(IEntityQuerySurrogate entityQuery)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum