Page 1 of 1

Getting Error Specified cast is not valid in Materializer

Posted: Wed 07 Oct 2009 14:15
by abhinay_agrawal
Hi,

I am working on Materializer while mapping result of Stored procedure through it's giving me Error

Specified cast is not valid

during debuging I observed that reader is giving field type as Double but while generating entity frame work it's giving Data Type value as Long so might be this is the cause of problem.

Can any one suggest me how to resolve this error
I am having column field in Oracle as

OrderID number(10)

in Entity Framework generate code it's having Long

Thanks,
Abhinay.

Posted: Thu 08 Oct 2009 12:33
by AndreyR
The problem seems to be associated with the Reader.GetValue() usage.
I recommend you to change the Materializer code in order to fix the problem.
If this advice is not helpful, please send us (support * devart * com, subject "EF Materializer")
a small test project illustrating the issue. Please include the script of DB objects to the project.

Posted: Fri 09 Oct 2009 05:13
by abhinay_agrawal
AndreyR wrote:The problem seems to be associated with the Reader.GetValue() usage.
I recommend you to change the Materializer code in order to fix the problem.
If this advice is not helpful, please send us (support * devart * com, subject "EF Materializer")
a small test project illustrating the issue. Please include the script of DB objects to the project.
Hi ,
When I am altering my table with number(10) to number(38) it's changing datatype in entity framework from long to decimal and it's working means this problem is not due to Reader.GetValue() might be there is some problem in datatype mapping while autogenerating edmx from DBase.

Can any one let me know is this a bug or any work around to this.

Thanks,
Abhinay.

Posted: Tue 13 Oct 2009 08:50
by AndreyR
Please send me (support * devart * com, subject "EF Materializer") a small test project illustrating the problem, I'll look into it.