I would like to know if in SQL is it possible to return a varchar value from a stored procedure, most of the examples I have seen the return value is an int
Example within a proc
declare @ErrorMessage varchar(255) if @TestFlag = 0 set @ErrorMessage = 'Test'
return @ErrorMessage
calling on asp.net Updated:
Error: Conversion failed when converting the varchar value 'Development' to data type int.
using (DataContextDataContext dc = conn.GetContext())
{
string serverName = ""
var result = dc.spGetServerName(ref serverName);
return result.ToString();
}