Thursday, February 18, 2016

Dynamic sql returns int instead of resultset

I had to create a stored procedure that was created dynamically. It so happened that when I tested it in SQL server, it ran, producing the results. When I implemented in and called it from a stored procedure, the return value was an int. After googling, i found a solution that worked. I had to create the stored procedure to produce similar results then import in into the application. Then, I went back and edited it to return the results that I wanted it to produce.

I found the trick here: http://www.techdreams.org/microsoft/fixing-linq-to-sql-issue-stored-procedure-definition-returns-int-instead-of-resultset-2/2752-20090614


No comments: