Is item.id a textfield or a numeriek field?
In the SQLExecute statement you make the field a string field and in the second example not.
I believe you should also use quotes in the first example (when it is a text field).
me.SQLExecute("DELETE FROM categories WHERE id='" + str(item.id)) + "'"
I’m just starting to use prepared statements but shouldn’t there be a bind statement?
ps = categories.Prepare("DELETE FROM categories WHERE id=?")
ps.BindType(0, SQLitePreparedStatement.SQLITE_INTEGER)
ps.Bind(0, item.id)
data = ps.SQLSelect