reidLinden
reidLinden

Reputation: 4170

Entity Framework Function Import returns incorrect Column Information

I am trying to import a function spa_SessionLoad which should be returning a particular row from my Session management table. When I click on the 'Get Column Information' button, it instead pulls the info from a different stored procedure (spa_InventoryUpdate), which returns a single string.

I'm working with a sql 2008 database, using database-first methods.

I've built a few other function imports, and they all seem to be correct.
I've verified the code on the SQL Server returns a row when the sproc is executed.

The culprit seems to be that my 'Load' function contains some cleanup code to deal with abandoned sessions, which ultimately calls the spa_InventoryUpdate procedure. The import tool seems to be getting confused with the return of that EXEC call, instead of the one for the 'Load' .

At any rate, how can I get the function imported, if its pulling the wrong return info?

Thanks

Upvotes: 2

Views: 481

Answers (1)

reidLinden
reidLinden

Reputation: 4170

It turns out that if you know the actual return type you can just specify it in the UI. In my case, I knew it was really returning a single "session" row, so I selected my "session" EF object, and everything worked as required.

Upvotes: 1

Related Questions