I have a SQL stored procedure that returns a column value (SQL data type: nchar(1)). The stored procedure runs and comes back with desired value when a parameter is passed. Based on this returned value, I want to divert the program flow. For this I need to read the value returned in an ASP.NET C# variable, but I am not sure how can I do this.
create procedure sproc_Type
@name as nchar(10)
AS
SELECT Type FROM Table WHERE Name = @name
I want to read Type value in .cs file and want to save it for later use.
1 Answer