Fix: SQL error when save data with attachment