SQL Table Value Function - Generated Code Execution Error

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Microsoft SQL Server
Post Reply
neveroddoreven
Posts: 1
Joined: Tue 26 May 2015 16:27

SQL Table Value Function - Generated Code Execution Error

Post by neveroddoreven » Tue 26 May 2015 17:28

Does Entity Developer support table value functions? I have a problem with Entity Developer not properly generating code w.r.t. table value functions.

When attempting to use the generated method from <DbName>.Designer.cs in a standard Linq query it explodes with the error: System.Data.SqlClient.SqlExceptionThe request for procedure '<redacted>' failed because '<redacted>' is a table valued function object.

System:
dotConnect 4.4 and SQL Server 2012

Thank you for your help, and apologies in advance if this is not posted in the proper forum.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: SQL Table Value Function - Generated Code Execution Error

Post by Shalex » Wed 27 May 2015 12:54

1. dotConnect for SQL Server supports neither Entity Framework nor Entity Developer. This provider includes only plain ADO.NET features: http://www.devart.com/dotconnect/sqlser ... tions.html.

2. We recommend using Entity Developer (Devart Entity Model, *.edml) instead of EDM Designer (ADO.NET Entity Data Model, *.edmx) for generating Entity Framework models because our tool has a lot of advantages: http://www.devart.com/entitydeveloper/ed-vs-edm.html. With SQL Server, Entity Developer works via standard System.Data.SqlClient (supplied with .NET Framework).
neveroddoreven wrote:When attempting to use the generated method from <DbName>.Designer.cs in a standard Linq query it explodes with the error: System.Data.SqlClient.SqlExceptionThe request for procedure '<redacted>' failed because '<redacted>' is a table valued function object.
3. We cannot reproduce the problem with a simple case:

Code: Select all

CREATE FUNCTION get_dept ()
RETURNS TABLE
AS
RETURN 
(
    SELECT * FROM Dept
);
Please send us a small test project with the corresponding DDL/DML script for reproducing.

Post Reply