Hi James, For information, DbLinq uses internally custom expression types to handle specific information like tables, columns, etc. Such Expressions are for internal use and SQL generation, and disappear before the end of generation. Such expressions have a NodeType value starting at 1000. 1012 is the code for a Column, 1020 for a parameter. Apparently in your case, some internal expressions are still present when the CLR part is generated (a DbLinq expression is split in two parts: CLR and SQL, both of them being kept in cache) That was to explain a bit what's going on :)
For action, now, can you provide a linq expression (as simple as possible) causing such exceptions? I'll try to translate them and place them into DbLinq unit tests, before trying to solve them. Thanks, Pascal. On Tue, Nov 25, 2008 at 12:14, Jimbo1982 <[EMAIL PROTECTED]> wrote: > > News on the exceptions: > > The ArgumentExceptions are bing raised in > ExpressionMutatorExtensions.Evaluate(this Expression expression) on > the line var compiled = lambda.Compile(); the exception message is > "Unhandled Expression Type: 1012" Full exception below. > > Another Expression type which is unhandled was: > > Unhandled Expression Type: 1020 > > The InvalidOperationException occurs in the same place with the > message > > Lambda Parameter not in scope > > Hope this helps, > > James > > INVALIDOPERATIONEXCEPTION > > System.InvalidOperationException occurred > Message="Lambda Parameter not in scope" > Source="System.Core" > StackTrace: > at > System.Linq.Expressions.ExpressionCompiler.GenerateParameterAccess > (ILGenerator gen, ParameterExpression p, StackType ask) > at System.Linq.Expressions.ExpressionCompiler.Generate > (ILGenerator gen, Expression node, StackType ask) > at System.Linq.Expressions.ExpressionCompiler.GenerateLambda > (LambdaExpression lambda) > at > System.Linq.Expressions.ExpressionCompiler.CompileDynamicLambda > (LambdaExpression lambda) > at System.Linq.Expressions.LambdaExpression.Compile() > at > > DbLinq.Data.Linq.Sugar.ExpressionMutator.ExpressionMutatorExtensions.Evaluate > (Expression expression) in C:\Documents and Settings\james.gralton > \Repository\DBLinqOldRev\DBLinqRev\src\DbLinq\Data\Linq\Sugar > \ExpressionMutator\ExpressionMutatorExtensions.cs:line 147 > InnerException: > > > > ARGUMENTEXPECTION > > System.ArgumentException occurred > Message="Unhandled Expression Type: 1012" > Source="System.Core" > StackTrace: > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression > exp) > at System.Linq.Expressions.ExpressionCompiler.Hoister.Hoist > (CompileScope scope) > at System.Linq.Expressions.ExpressionCompiler.GenerateLambda > (LambdaExpression lambda) > at > System.Linq.Expressions.ExpressionCompiler.CompileDynamicLambda > (LambdaExpression lambda) > at System.Linq.Expressions.LambdaExpression.Compile() > at > > DbLinq.Data.Linq.Sugar.ExpressionMutator.ExpressionMutatorExtensions.Evaluate > (Expression expression) in C:\Documents and Settings\james.gralton > \Repository\DBLinqOldRev\DBLinqRev\src\DbLinq\Data\Linq\Sugar > \ExpressionMutator\ExpressionMutatorExtensions.cs:line 147 > InnerException: > > > > -- Pascal. jabber/gtalk: [EMAIL PROTECTED] msn: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DbLinq" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/dblinq?hl=en -~----------~----~----~----~------~----~------~--~---
