docs: public int getIDFromCode(String strCode)
      {
          int iID = 0;
          try   {
              iID = Integer.parseInt(strCode);    // Special case - if an integer, just convert it.
          } catch (NumberFormatException ex)  {
              iID = 0;
          }
          if (iID == 0)
          {
              int iTargetKeyArea = this.getCodeKeyArea();   // Key 0 cannot be the code key
              if (iTargetKeyArea != 0)
              {
                  KeyArea keyArea = this.getKeyArea(iTargetKeyArea);
                  int iOldKeyArea = this.getDefaultOrder();
                  this.setKeyArea(iTargetKeyArea);
                  BaseField field = keyArea.getField(0);
                  field.setString(strCode);
                  try   {
                      if (this.seek(null))
                      {
                          iID = (int)this.getField(DBConstants.MAIN_FIELD).getValue();
                      }
                  } catch (DBException ex)    {
                      ex.printStackTrace();
                  } finally {
                      this.setKeyArea(iOldKeyArea);
                  }
              }
          }
          return iID;
      }