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
As a programmer, there are no real problems but challenges...ones that we need to overcome. This means that there is a solution for all challenges that one may face. For all the challenges that I have faced, I will share them and their solutions.
Showing posts with label dynamic. Show all posts
Showing posts with label dynamic. Show all posts
Thursday, February 18, 2016
Unable to cast object of type 'Data' to type 'System.IConvertible'
I came upon this error when developing an application. I was using a foreach loop to dynamically create a select list. It so happened that I was not looping on the result without point to value in it.
So instead of just using @y i had to use @y.name in the select option
So instead of just using @y i had to use @y.name in the select option
Subscribe to:
Posts (Atom)