I have a query which retuns a string value as the output. But shows an error in the return. I dont know how to fix it. Here i have added my query.
public string detailsRemarksGet(string ddlValue)
{
string strQuery = @"select r.remarks
from [A_MASTER] m, [A_REMARKS] r
where m.A_REF_NO=r.A_REF_NO
and r.A_REF_NO='"+ ddlValue +"' and DEPT='POS' ";
return SqlHelper.ExecuteScalar(strConnStringAppeal, CommandType.Text, strQuery);
}
Here is mky code of .cs
public string detailsRemarks(string ddlValue)
{
string remarks= db.detailsRemarksGet(ddlValue);
return remarks;
}
In the error list i get a message as follows
Error 2 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)