Delete & Update query in .Net
try
{
ConnectDB dbconToDeleteITStudent = new ConnectDB();
OdbcConnection conToDelITStu = dbconToDeleteITStudent.createDBCon();
OdbcCommand UpdateAttendanceComnew = new OdbcCommand(updateAttendances, conToDelITStu);
UpdateAttendanceComnew.ExecuteNonQuery();
string deleteStudent = "DELETE FROM IT WHERE ITID = '" + SubID + "'";
OdbcCommand command = new OdbcCommand(deleteStudent, conToDelITStu);
command.ExecuteNonQuery();
}
Comments
Post a Comment