I am calling ExecuteScalar
with a valid value, and it worked on my previous one. I'm using using Oracle.ManagedDataAccess.Client;
. Yet in this call it is returning null
when the value should be 'Q'. Here is the code:
cmd.Parameters.Add(new OracleParameter("Cbrtaxfilcd_Descr", cbrEmployers.Cbrtaxfilcd_Descr));
//cmd.CommandText = "select Code from CBR_TAX_FILING_CODES where DESCR = :Cbrtaxfilcd_Descr";
cmd.CommandText = "select Code from CBR_TAX_FILING_CODES where DESCR = 'Quarterly'";
try
{
//should be a string
cbrEmployers.Cbrtaxfilcd_Code = Convert.ToString(cmd.ExecuteScalar());
}
catch (Exception ex)
{
var message = ex.Message;
//todo
}