Can now update database after pattern selected.