sql error while edit save fixed