Stored procedure error: "The data reader is incompatible..."

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Anchor
Posts: 31
Joined: Mon 08 Dec 2008 21:02
Location: Massachustts/USA

Stored procedure error: "The data reader is incompatible..."

Post by Anchor » Tue 24 Feb 2009 20:51

I am trying to execute a stored procedure but I keep running into the following error.

"The data reader is incompatible with the specified 'AttrNmValViewDO'.
A member of the type, 'ENTITY_ID', does not have a corresponding column in the data reader with
the same name
."

I checked entity in the data model and it matches the corresponding view in the database. I also checked the stored procedure and it is returning the correct number of parameters so I am not quite sure what is happening.

I am executing three other stored procedures without any trouble so I don't what could be causing the problem. The three other stored procedured return entities that are mapped to a table, or joined tables, instead of a view so maybe there is a problem there.

Has anyone you seen this problem before and has an idea what it could be?

Thanks,
Joe

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 25 Feb 2009 11:16

This problem usually arises when the cursor returned by stored procedure has a set of columns that differs from the set of view's columns.
The difference can be in names of these columns. Please check it.
If this advice does not help, please send me (support * devart * com, subject "EF: Data Reader is incompatible with view")
the script of your procedure, view, and DB objects the view is based on.

Anchor
Posts: 31
Joined: Mon 08 Dec 2008 21:02
Location: Massachustts/USA

Post by Anchor » Wed 25 Feb 2009 21:38

That was it. The recordset being returned had a different column name than the one defined in the entity. Thanks for the help!

Post Reply