title: Change start index in combobox?
body: <p>I have a form with different text boxes where you can save the info from a person in a table. There is also a combo box showing five values from another table, where you will be able to select and save at the same table as they appear from.</p>
  
  <p>The problem is that the combo box is 0-index based and the table begins at 1. When I save the second entry it really saves the third. If I choose the first item in the combo this error appears: <em>"FOREIGN KEY conflict"</em>...</p>
  
  <p>Is it possible to set the start-index to 1 in the combo, or is it the keys in the two tables that are wrong?</p>
  
  <p>I don't find a way to fix this.</p>
  
  <pre><code>SqlCommand command = new SqlCommand ("INSERT INTO Employee (Name1, Email, Salary,"+
              "DateofBirth, OnparantalLeave, DepartmentId) " + 
              "VALUES (@Name1, @Email, @Salary, @DateofBirth,"+
              "@OnparantalLeave, @DepartmentId)", MyConnection.GetConnection());
  command.Connection = MyConnection.GetConnection();
  command.Parameters.AddWithValue("@Name1", textBoxNameF2.Text);
  command.Parameters.AddWithValue("@Email", textBoxMailF2.Text);
  command.Parameters.AddWithValue("@Salary", textBoxSalF2.Text);
  command.Parameters.AddWithValue("@DateofBirth", SqlDbType.Date).Value =
          dateTimePickerF2.Value.Date;
  command.Parameters.AddWithValue("@OnparantalLeave", checkBoxParantF2.Checked);
  command.Parameters.AddWithValue("@DepartmentId", comboBoxDepF2.SelectedIndex);
  command.ExecuteNonQuery();
  command.Parameters.Clear();
  this.Close();
  </code></pre>