Hi,
I'm learning Linq and converted a Northwind database to FB 2.5 and while
not a production database I'd love to fix errors encountered.
Provider dated 9/6/10 still gives the same error encountered previously
and noted at bottom. I've also regenerated the entity model with no
changes.
And while a change the sql statement from cast(x as decimal(19,0)... to
decimal(18,0) fixes the error I can't get the provider to change.
TIA
John
LinqPad: 4.20
FB: 2.5
.Net Provider: 2.5.2 dated 9/6
Linq: from p in Products
let spanishOrders = p.OrderDetails.Where (o => o.Order.ShipCountry ==
"Spain")
where spanishOrders.Any()
orderby p.ProductName
select new
{
p.ProductName,
Orders = spanishOrders.Count(),
TotalValue = spanishOrders.Sum (o =>o.UnitPrice * o.Quantity)
}
Results:
Fail: decimalPrecision must be less than or equal to 18
Command:
SELECT
"Project3"."ProductID" AS "ProductID",
"Project3"."ProductName" AS "ProductName",
"Project3"."C1" AS "C1",
"Project3"."C2" AS "C2"
FROM ( SELECT
"Project2"."ProductID" AS "ProductID",
"Project2"."ProductName" AS "ProductName",
"Project2"."C1" AS "C1",
(SELECT
SUM("Filter4"."A1") AS "A1"
FROM ( SELECT
"Extent6"."UnitPrice" * (CAST("Extent6"."Quantity" AS
DECIMAL(19,0))) AS "A1"
FROM (SELECT
"OrderDetails"."OrderID" AS "OrderID",
"OrderDetails"."ProductID" AS "ProductID",
"OrderDetails"."UnitPrice" AS "UnitPrice",
"OrderDetails"."Quantity" AS "Quantity",
"OrderDetails"."Discount" AS "Discount"
FROM "OrderDetails" AS "OrderDetails") AS "Extent6"
INNER JOIN "Orders" AS "Extent7" ON "Extent6"."OrderID" =
"Extent7"."OrderID"
WHERE ("Project2"."ProductID" = "Extent6"."ProductID") AND
(_UTF8'Spain' = "Extent7"."ShipCountry")
) AS "Filter4") AS "C2"
FROM ( SELECT
"Extent1"."ProductID" AS "ProductID",
"Extent1"."ProductName" AS "ProductName",
(SELECT
COUNT("Filter3"."A1") AS "A1"
FROM ( SELECT
1 AS "A1"
FROM (SELECT
"OrderDetails"."OrderID" AS "OrderID",
"OrderDetails"."ProductID" AS "ProductID",
"OrderDetails"."UnitPrice" AS "UnitPrice",
"OrderDetails"."Quantity" AS "Quantity",
"OrderDetails"."Discount" AS "Discount"
FROM "OrderDetails" AS "OrderDetails") AS "Extent4"
INNER JOIN "Orders" AS "Extent5" ON "Extent4"."OrderID" =
"Extent5"."OrderID"
WHERE ("Extent1"."ProductID" = "Extent4"."ProductID") AND
(_UTF8'Spain' = "Extent5"."ShipCountry")
) AS "Filter3") AS "C1"
FROM "Products" AS "Extent1"
WHERE EXISTS (SELECT
1 AS "C1"
FROM (SELECT
"OrderDetails"."OrderID" AS "OrderID",
"OrderDetails"."ProductID" AS "ProductID",
"OrderDetails"."UnitPrice" AS "UnitPrice",
"OrderDetails"."Quantity" AS "Quantity",
"OrderDetails"."Discount" AS "Discount"
FROM "OrderDetails" AS "OrderDetails") AS "Extent2"
INNER JOIN "Orders" AS "Extent3" ON "Extent2"."OrderID" =
"Extent3"."OrderID"
WHERE ("Extent1"."ProductID" = "Extent2"."ProductID") AND
(_UTF8'Spain' = "Extent3"."ShipCountry")
)
) AS "Project2"
) AS "Project3"
ORDER BY "Project3"."ProductName" ASC
An error occurred while executing the command definition. See the inner
exception for details.
Message An error occurred while executing the command definition. See
the inner exception for details.
Data
InnerException Dynamic SQL ErrorSQL error code = -842Precision must be
from 1 to 18
Errors Class LineNumber Message Number
0 0 335544569
0 0 335544436
0 0 -842
0 0 335544697
0 0 Dynamic SQL Error
SQL error code = -842
Precision must be from 1 to 18 335544569
0 0 1342177429
ErrorCode 335544569
SQLSTATE 42000
Message Dynamic SQL Error
SQL error code = -842
Precision must be from 1 to 18
Data
InnerException Dynamic SQL ErrorSQL error code = -842Precision must be
from 1 to 18
Errors Message ErrorCode StrParam Type IsArgument
IsWarning
335544569 1 False False
335544436 1 False False
-842 -842 4 True False
335544697 1 False False
Dynamic SQL Error
SQL error code = -842
Precision must be from 1 to 18 335544569 0 False
False
1342177429 7
Message Dynamic SQL Error
SQL error code = -842
Precision must be from 1 to 18
ErrorCode 335544569
SQLSTATE 42000
IsWarning False
Data
InnerException
TargetSite GdsDatabase.ProcessResponse (IResponse response)
Name ProcessResponse
DeclaringType typeof (GdsDatabase)
ReflectedType typeof (GdsDatabase)
MemberType Method
MetadataToken 100664175
Module FirebirdSql.Data.FirebirdClient.dll
MDStreamVersion 131072
FullyQualifiedName
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FirebirdSql.Data.FirebirdClie
nt\v4.0_2.5.2.0__3750abcc3150b00c\FirebirdSql.Data.FirebirdClient.dll
ModuleVersionId fa40a148-9909-41d2-b17e-326817c59fc7
MetadataToken 1
ScopeName FirebirdSql.Data.FirebirdClient.dll
Name FirebirdSql.Data.FirebirdClient.dll
Assembly FirebirdSql.Data.FirebirdClient, Version=2.5.2.0,
Culture=neutral, PublicKeyToken=3750abcc3150b00c
ModuleHandle System.ModuleHandle
IsSecurityCritical True
IsSecuritySafeCritical False
IsSecurityTransparent False
MethodHandle System.RuntimeMethodHandle
Value 148240836
Attributes PrivateScope, Family, HideBySig
CallingConvention Standard, HasThis
ReturnType typeof (Void)
ReturnTypeCustomAttributes Void
ParameterType typeof (Void)
Name
DefaultValue
RawDefaultValue
MetadataToken 134217728
Position -1
Attributes None
Member GdsDatabase.ProcessResponse (IResponse response)
IsIn False
IsOut False
IsLcid False
IsRetval False
IsOptional False
ReturnParameter Void
ParameterType typeof (Void)
Name
DefaultValue
RawDefaultValue
MetadataToken 134217728
Position -1
Attributes None
Member GdsDatabase.ProcessResponse (IResponse response)
IsIn False
IsOut False
IsLcid False
IsRetval False
IsOptional False
IsGenericMethod False
IsGenericMethodDefinition False
ContainsGenericParameters False
IsPublic False
IsPrivate False
IsFamily True
IsAssembly False
IsFamilyAndAssembly False
IsFamilyOrAssembly False
IsStatic False
IsFinal False
IsVirtual False
IsHideBySig True
IsAbstract False
IsSpecialName False
IsConstructor False
StackTrace at
FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ProcessResponse(IR
esponse response)
at
FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadResponse()
at
FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.ReadGenericRespons
e()
at
FirebirdSql.Data.Client.Managed.Version11.GdsStatement.Prepare(String
commandText)
at FirebirdSql.Data.FirebirdClient.FbCommand.Prepare(Boolean
returnsSet)
at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior
behavior, Boolean returnsSet)
at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior
behavior)
HelpLink
Source FirebirdSql.Data.FirebirdClient
TargetSite FbCommand.ExecuteReader (CommandBehavior behavior)
Name ExecuteReader
DeclaringType typeof (FbCommand)
ReflectedType typeof (FbCommand)
MemberType Method
MetadataToken 100664596
Module FirebirdSql.Data.FirebirdClient.dll
MDStreamVersion 131072
FullyQualifiedName
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FirebirdSql.Data.FirebirdClie
nt\v4.0_2.5.2.0__3750abcc3150b00c\FirebirdSql.Data.FirebirdClient.dll
ModuleVersionId fa40a148-9909-41d2-b17e-326817c59fc7
MetadataToken 1
ScopeName FirebirdSql.Data.FirebirdClient.dll
Name FirebirdSql.Data.FirebirdClient.dll
Assembly FirebirdSql.Data.FirebirdClient, Version=2.5.2.0,
Culture=neutral, PublicKeyToken=3750abcc3150b00c
CodeBase
file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/FirebirdSql.Data.Fire
birdClient/v4.0_2.5.2.0__3750abcc3150b00c/FirebirdSql.Data.FirebirdClien
t.dll
FullName FirebirdSql.Data.FirebirdClient, Version=2.5.2.0,
Culture=neutral, PublicKeyToken=3750abcc3150b00c
EntryPoint
Evidence
PermissionSet
SecurityRuleSet Level2
ManifestModule FirebirdSql.Data.FirebirdClient.dll
ReflectionOnly False
Location
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\FirebirdSql.Data.FirebirdClie
nt\v4.0_2.5.2.0__3750abcc3150b00c\FirebirdSql.Data.FirebirdClient.dll
ImageRuntimeVersion v4.0.30319
GlobalAssemblyCache True
HostContext 0
IsDynamic False
EscapedCodeBase
file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/FirebirdSql.Data.Fire
birdClient/v4.0_2.5.2.0__3750abcc3150b00c/FirebirdSql.Data.FirebirdClien
t.dll
IsFullyTrusted True
ModuleHandle System.ModuleHandle
MDStreamVersion 131072
IsSecurityCritical True
IsSecuritySafeCritical False
IsSecurityTransparent False
MethodHandle System.RuntimeMethodHandle
Value 216401732
Attributes PrivateScope, Public, HideBySig
CallingConvention Standard, HasThis
ReturnType typeof (FbDataReader)
ReturnTypeCustomAttributes
FirebirdSql.Data.FirebirdClient.FbDataReader
ParameterType typeof (FbDataReader)
Name
DefaultValue
RawDefaultValue
MetadataToken 134217728
Position -1
Attributes None
Member FbCommand.ExecuteReader (CommandBehavior behavior)
IsIn False
IsOut False
IsLcid False
IsRetval False
IsOptional False
ReturnParameter FirebirdSql.Data.FirebirdClient.FbDataReader
ParameterType typeof (FbDataReader)
Name
DefaultValue
RawDefaultValue
MetadataToken 134217728
Position -1
Attributes None
Member FbCommand.ExecuteReader (CommandBehavior behavior)
IsIn False
IsOut False
IsLcid False
IsRetval False
IsOptional False
IsGenericMethod False
IsGenericMethodDefinition False
ContainsGenericParameters False
IsPublic True
IsPrivate False
IsFamily False
IsAssembly False
IsFamilyAndAssembly False
IsFamilyOrAssembly False
IsStatic False
IsFinal False
IsVirtual False
IsHideBySig True
IsAbstract False
IsSpecialName False
IsConstructor False
StackTrace at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteReader(CommandBehavior
behavior)
at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteDbDataReader(CommandBeh
avior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior
behavior)
at
System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(En
tityCommand entityCommand, CommandBehavior behavior)
HelpLink
Source FirebirdSql.Data.FirebirdClient
TargetSite EntityCommandDefinition.ExecuteStoreCommands
(EntityCommand entityCommand, CommandBehavior behavior)
Name ExecuteStoreCommands
DeclaringType typeof (EntityCommandDefinition)
ReflectedType typeof (EntityCommandDefinition)
MemberType Method
MetadataToken 100669920
Module System.Data.Entity.dll
MDStreamVersion 131072
FullyQualifiedName
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0
.0__b77a5c561934e089\System.Data.Entity.dll
ModuleVersionId e38c3fba-4060-4078-a61d-82986bc6f760
MetadataToken 1
ScopeName System.Data.Entity.dll
Name System.Data.Entity.dll
Assembly System.Data.Entity, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
CodeBase
file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.Entity/v4
.0_4.0.0.0__b77a5c561934e089/System.Data.Entity.dll
FullName System.Data.Entity, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
EntryPoint
Evidence <System.Security.Policy.GacInstalled version="1"/>
<StrongName version="1" Key="00000000000000000400000000000000"
Name="System.Data.Entity" Version="4.0.0.0"/>
<System.Security.Policy.Url version="1">
<Url>file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.Enti
ty/v4.0_4.0.0.0__b77a5c561934e089/Sy...
<System.Security.Policy.Zone version="1"> <Zone>MyComputer</Zone>
</System.Security.Policy.Zone>
<System.Security.Policy.Hash version="2"> <hash algorithm="SHA1"
value="85BD419104169A8F04D7AC8D4DE70F88A0DB2811"/> <hash
algorithm="SHA256" value...
<System.Security.Policy.Publisher version="1">
<X509v3Certificate>3082047A30820362A003020102020A6101CF3E00000000000F300
D06092A864886F70D0101050500307...
PermissionSet
SecurityRuleSet Level1
ManifestModule System.Data.Entity.dll
ReflectionOnly False
Location
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.Entity\v4.0_4.0.0
.0__b77a5c561934e089\System.Data.Entity.dll
ImageRuntimeVersion v4.0.30319
GlobalAssemblyCache True
HostContext 0
IsDynamic False
EscapedCodeBase
file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.Entity/v4
.0_4.0.0.0__b77a5c561934e089/System.Data.Entity.dll
IsFullyTrusted True
ModuleHandle System.ModuleHandle
MDStreamVersion 131072
IsSecurityCritical False
IsSecuritySafeCritical False
IsSecurityTransparent True
MethodHandle System.RuntimeMethodHandle
Value 1731589840
Attributes PrivateScope, Assembly, HideBySig
CallingConvention Standard, HasThis
ReturnType typeof (DbDataReader)
ReturnTypeCustomAttributes System.Data.Common.DbDataReader
ParameterType typeof (DbDataReader)
Name
DefaultValue
RawDefaultValue
MetadataToken 134217728
Position -1
Attributes None
Member EntityCommandDefinition.ExecuteStoreCommands (EntityCommand
entityCommand, CommandBehavior behavior)
IsIn False
IsOut False
IsLcid False
IsRetval False
IsOptional False
ReturnParameter System.Data.Common.DbDataReader
ParameterType typeof (DbDataReader)
Name
DefaultValue
RawDefaultValue
MetadataToken 134217728
Position -1
Attributes None
Member EntityCommandDefinition.ExecuteStoreCommands (EntityCommand
entityCommand, CommandBehavior behavior)
IsIn False
IsOut False
IsLcid False
IsRetval False
IsOptional False
IsGenericMethod False
IsGenericMethodDefinition False
ContainsGenericParameters False
IsPublic False
IsPrivate False
IsFamily False
IsAssembly True
IsFamilyAndAssembly False
IsFamilyOrAssembly False
IsStatic False
IsFinal False
IsVirtual False
IsHideBySig True
IsAbstract False
IsSpecialName False
IsConstructor False
StackTrace at
System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(En
tityCommand entityCommand, CommandBehavior behavior)
at
System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultTyp
e](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1
forMergeOption)
at
System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable
<T>.GetEnumerator()
at System.Data.Objects.ObjectQuery`1.GetEnumeratorInternal()
at
System.Data.Objects.ObjectQuery.System.Collections.IEnumerable.GetEnumer
ator()
HelpLink
Source System.Data.Entity
==== end of error log ======
=======================================================================
Previous Comment from 4/29
I just encountered the same issues reported in Vol 48, Issue #5 Topic #5
and (48,6,2) using VS2010, DDEX provider 2.0.5, Entity Framework 4 with
Firebird 2.5.2. I re-generated the emdx file, checked the csdl secttion
and have encountered the exact same error using Linqpad to test. I'm not
sure if issue has been dropped as it doesn't appear in the list and I'm
not sure of the protocols to follow-up unresolved issues.
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider