title: Unable to INSERT in SQLite, Error code:19
body: <p>When I'm trying to run the following : </p>
  
  <pre class="lang-java prettyprint-override"><code>  ContentValues cv = new ContentValues();
    cv.put(table_LocalSettings_Unit, input);
    mDb.insert(table_LocalSettings, "", cv);
  </code></pre>
  
  <p>I got the following error:</p>
  
  <blockquote>
    <p>Error inserting unit = 0;<br/>
    SqliteConstraintException: error code 19 constraint failed.<br/></p>
  </blockquote>
  
  <p>What should be the problem ?
  The table sql Code is:</p>
  
  <pre class="lang-sql prettyprint-override"><code> "create table if not exists " + table_LocalSettings + "( " + table_LocalSettings_ID
       + " INTEGER PRIMARY KEY NOT NULL , " + table_LocalSettings_MapType
       + " INTEGER NOT NULL , " + table_LocalSettings_Visib + " BIT NOT NULL , "
       + table_LocalSettings_Unit + " INTEGER DEFAULT 0 NOT NULL , "
       + table_LocalSettings_SpeedUnit + " INTEGER NOT NULL , "
       + table_LocalSettings_Alert + " BIT NOT NULL ," + table_LocalSettings_UserID
       + " INTEGER DEFAULT -1 , " + table_LocalSettings_Username + " VARCHAR , "
       + table_LocalSettings_PowerSave + " VARCHAR , " + table_LocalSettings_PremiumUser
       + " INTEGER NOT NULL DEFAULT 0);";
  </code></pre>