I'm trying to use a PassThruESQLQuery that does a COUNT_BIG on an entity. COUNT_BIG is being used since it returns a BIGINT, instead of COUNT, which returns just an INT.
SELECT VALUE COUNT_BIG(u.ObjectID) FROM MyEntitySet AS u
The same query will work if I use COUNT but not with COUNT_BIG (which is supposed to be supported in Entity Framework). It just throws the error below.
I'm not sure if this is a DevForce problem or Entity Framework problem. I'm using the official Silverlight 3 and DevForce Silverlight releases.
Any thoughts?
IdeaBlade.EntityModel.Server.EntityServerErrorHandler:CreateMessageFault">Caught exception: System.Data.EntitySqlException: 'COUNT_BIG' cannot be resolved into a valid type constructor or function., near function, method or type constructor, line 1, column 23. at System.Data.Common.EntitySql.SemanticResolver.ResolveNameAsStaticMethodOrFunction(MethodExpr methodExpr, TypeUsage& constructorType, TypeUsage& staticMethodType, IList`1& functionType)
at System.Data.Common.EntitySql.SemanticAnalyzer.ConvertStaticMethodOrFunction(MethodExpr methodExpr, SemanticResolver sr) at System.Data.Common.EntitySql.SemanticAnalyzer.ConvertMethodExpr(Expr expr, SemanticResolver sr) at System.Data.Common.EntitySql.SemanticAnalyzer.Convert(Expr astExpr, SemanticResolver sr) at System.Data.Common.EntitySql.SemanticAnalyzer.ProcessGroupByClause(DbExpressionBinding source, QueryExpr queryExpr, SemanticResolver sr) at System.Data.Common.EntitySql.SemanticAnalyzer.ConvertQuery(Expr expr, SemanticResolver sr) at System.Data.Common.EntitySql.SemanticAnalyzer.Convert(Expr astExpr, SemanticResolver sr) at System.Data.Common.EntitySql.SemanticAnalyzer.ConvertRootExpression(Expr astExpr, SemanticResolver sr) at System.Data.Common.EntitySql.SemanticAnalyzer.Analyze(Expr astExpr, DbCommandTree commandTree) at System.Data.Common.EntitySql.CqlQuery.AnalyzeSemantics(DbCommandTree builderTree, Expr astExpr, Perspective perspective, ParserOptions parserOptions, Dictionary`2 parameters, Dictionary`2 variables) at System.Data.Common.EntitySql.CqlQuery.Compile(DbCommandTree builderTree, String queryText, Perspective perspective, ParserOptions parserOptions, Dictionary`2 parameters, Dictionary`2 variables) at System.Data.Objects.EntitySqlQueryState.Parse(DbCommandTree parseTree) at System.Data.Objects.EntitySqlQueryState.GetResultType() at System.Data.Objects.Internal.ObjectQueryState.get_ResultType() at System.Data.Objects.ObjectQuery.GetResultType() at lambda_method(ExecutionScope , Object , Object[] ) at IdeaBlade.Core.MemberInfoFns.FastMethodInvoke(Object instance, MethodInfo method, Object[] args) at IdeaBlade.EntityModel.Edm.EdmQueryExecutor.GetResultTypeUsage(IQueryable objectQuery) at IdeaBlade.EntityModel.Edm.PassthruEsqlQueryExecutor.ExecuteQuery(PassthruEsqlQuery query) at IdeaBlade.EntityModel.Edm.PassthruEsqlQueryExecutor.ExecuteCore(IEntityQuery query, IDataSourceKey edmKey) at IdeaBlade.EntityModel.Edm.PassthruEsqlQueryExecutor.Execute(IEntityQuery query, IDataSourceKey edmKey) at IdeaBlade.EntityModel.Server.EntityServer.Fetch(IEntityQuery query, IDataSourceKey dsKey) at IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle, IEntityQuerySurrogate surrogate) at SyncInvokeFetch(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
|