I have created one webform in Drupal 7 in which some form components are present. But when I'm going to view that webform the components(fields) are not displayed. Then I checked in form setting that form was closed but when I'm going to change the form setting to open and saving that form I'm getting error "The website encountered an unexpected error. Please try again later". Then in dblog there was the following mysql error.
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '39055' for key 1: INSERT INTO {webform} (nid, confirmation, confirmation_format, redirect_url, status, block, teaser, allow_draft, auto_save, submit_notice, submit_text, submit_limit, submit_interval, total_submit_limit, total_submit_interval) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 39055 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => full_html [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => 0 [:db_insert_placeholder_7] => 0 [:db_insert_placeholder_8] => 0 [:db_insert_placeholder_9] => 0 [:db_insert_placeholder_10] => [:db_insert_placeholder_11] => -1 [:db_insert_placeholder_12] => -1 [:db_insert_placeholder_13] => -1 [:db_insert_placeholder_14] => -1 ) in drupal_write_record() (line 7194 of /home/indiawaterportal/public_html/includes/common.inc).
Please help me to solve this issue.