Any error message in your logs ?
Try removing the project name.
As @lrose said, you're using a regular transaction for named queries. Use a namedQueryTransaction.
But I also agree with him: That's hardly transaction-worthy. If you're never rolling back...
In this particular case, I'd probably just build the query dynamically and use runPrepUpdate
just once.
something like
q = """
delete from your_table
where id in ({})
""".format(','.join('?' * len(selRows)))
system.db.runPrepUpdate(q, [product['ProductID'] for product in selRows])
Also, don't use id
as a variable name, it's a built-in identifier. While it may not cause any harm in this situation, I suggest never using built-in names for your own stuff.