I would
1) debug the result of getting the 'id' to make sure it's valid
2) use a sql client and manually issue the delete command you're putting together, but I'd also change from Lot_Numbers to the fully qualified form eg db.table
3) If this doesnt work, verify id's, table name, permissions etc
then
you're doing a lot of work opening the connection every time in the loop (and you dont close it) .. why don't you add your id's from the loop to a list/array, then build a delete statement of the form
delete from db.table where id in (1,2,3,4,6);
and execute the delete statement once at the end of the loop