You're trying to pass a
DataRowView
as the value of a parameter. That's not going to work. You need to pass the value of one of the row's columns as the parameter value instead.
For example:
cmd.Parameters.Add(new SQLiteParameter("@1", row["class_id"]));