I need to return a NULL or Blank value for Apvl_Lvl_Id if the SQL result returns NULL as the integration this passes the Apvl_Lvl_Id value to can't handle a value if it doesn't match an existing value for that instance.
I can't figure out what I'm missing, hoping someone can offer some pointers. Hope the below code is enough for an example.
while (dr.Read())
{
if(dr.IsDBNull(Apvl_Lvl_Id))
{
int? Apvl_Lvl_IdNULL;
Apvl_Lvl_Id = Apvl_Lvl_IdNULL;
}
else
{
Apvl_Lvl_Id = dr.GetInt32(0);
}
}