Check the value set is in the DB or not ?
using (OdbcCommand checkITStu = new OdbcCommand("SELECT * from IT where ITID = '" + SubID + "'", conToDelStu))
{
using (OdbcDataReader ITStudentNameReader = checkITStu.ExecuteReader())
{
if (ITStudentNameReader.HasRows)
{
if (deleteFromITDbTbl(SubID)) { return true; }
else return false;
}
else{ return false;}
}
}
Comments
Post a Comment