title: Conversion failed when converting the "invalid" value 'Residential' to data type int
body: <p>How do I convert data that is given from result set string.
  I am trying to show the drop down box gui as a text but give it a value of 1 and 2</p>
  
  <p>what I want it to show as for drop down choice is right:
  <a href="https://i.imgur.com/gDKAkDX.png" rel="nofollow noreferrer">https://i.imgur.com/gDKAkDX.png</a></p>
  
  <p>but I need the actual values to be 1 and 2 correspondingly</p>
  
  <p>Then I need to put those values back into a database f key that only allows int...</p>
  
  <pre><code>final ObservableList options = FXCollections.observableArrayList();
  
  
  public void fillComboBox() {
      Connection c;
  
  
      try {
          Connection conn = null;
          Statement stmt = null;
          String queryx = "Select CusType_ID, CusTypeName from CustomerType";
  
          ResultSet jrs = c.createStatement().executeQuery(queryx);
  
          while (jrs.next()) {
  
              String custyID = jrs.getString("CusType_ID");
              String custyN = jrs.getString("CusTypeName");
  
  
              options.add(new MyObject(custyID,custyN));
              typeBox.setItems(options);
          }
      } catch (SQLException e) {
          e.printStackTrace();
      }
  }
  
  
  
  String sql = "INSERT INTO Customer [CustomerType_ID]) VALUES" typeBox.getValue() +"')";
  </code></pre>