nothing wrong with the code, cross check for the form status and the action carried out thereof, SQL has not become intelligent to perform an Insert instead of Update