Reputation: 123
I am trying to pass table valued parameters through Entity Framework. I know that when I imported the stored procedure in Entity Framework it gave me the warning that
"Warning 1 Error 6005: The function has a parameter that has a data type 'table type' which is currently not supported for the target Entity Framework version. The function was excluded."
But still the stored procedure was imported and it worked fine. I did this in VS2013 and Entity Framework 5.0. Now I am trying to do the same in Team Foundation Server in VS2012. It shows me similar warning with the only difference that like
The function has a parameter that has a data type 'table type' which is currently not supported for the target .NET Framework version. The function was excluded.
and this time that particular stored procedure was not imported and is not listed. Can anyone explain to me why this is happening and how I can work around it??
Upvotes: 1
Views: 2222
Reputation: 63
It's quite a long time since the question has been asked here. But maybe it helps anyone having the same issue. I had the same error message in multiple cases in our project, but it had nothing to do with the parameters of the SP's or version of EF in our case, but with superfluous entries in the .csdl, .msdl and .ssdl files generated by EF. After deleting some SP's from the database and updating the model with the EF Dialog after, EF didn't delete all SP-entries and SP_Result entries in the files above. After deleting them manually with the model browser from the folders 'Complex types' and 'Function Imports' the error (6005) disappeared for me.
Upvotes: 2
Reputation: 123
I have not resolved this issue in VS2012 but worked around it by using comma separated values instead of table valued parameters to my stored procedure and created a split string function to insert the values to table with reference to this link http://stackoverflow.com/questions/14811316/separate-comma-separated-values-and-store-in-table-in-sql-server
Still would like to know how to pass table valued parameters to VS2012.
Upvotes: 0