title: Sqlite constraint failed error in android project
body: <p>My table structure is as shown below </p>
  
  <pre><code>CREATE TABLE MCARE_HOUSE_DETAILS (
                  HOUSE_DTL_ID VARCHAR(20) NOT NULL,
                  HOUSE_SRV_DTL_ID VARCHAR(20) NULL,
                  WARD_ID VARCHAR(20)  NOT NULL,
                  HOUSE_NO VARCHAR(50) NOT NULL,
                  HOUSE_NAME VARCHAR(50),
                  ADDRESS VARCHAR(300),
                  HOUSE_TYPE VARCHAR(20) ,
                  ELECTRICITY CHAR(1),
                  LATRINE_TYPE VARCHAR(20) ,
                  WATER_SOURCE VARCHAR(20) ,
                  WATER_STORAGE_FACILITY INTEGER,
                  WASTE_DISPOSAL_SOLID VARCHAR(20) ,
                  WASTE_DISPOSAL_LIQUID VARCHAR(20) ,
                  SURVEY_DATE CHAR(10),
                  CREATED_USER_ID VARCHAR(20) ,
                  CREATED_DATE CHAR(19),
                  MODIFIED_USER_ID VARCHAR(20) ,
                  MODIFIED_DATE CHAR(19),
                  UPLOAD_STATUS CHAR(1),
                  INSTITUTION_ID VARCHAR(10),
                  NEW_WARD_ID VARCHAR(20) ,
                  NEW_HOUSE_NO VARCHAR(50),
                  UNIQUE_HOUSE_NO VARCHAR(50),
                  PRIMARY KEY (HOUSE_DTL_ID))
  </code></pre>
  
  <p>Insert query block is as below </p>
  
  <pre><code>  openDB=DBConnection.getInstance(context).openDataBase();      
  SQLiteStatement statement = openDB.compileStatement("INSERT INTO MCARE_HOUSE_DETAILS (HOUSE_DTL_ID,WARD_ID,HOUSE_NO) VALUES(?,?,?);");   
  statement.bindString(1,houseId);  
  statement.bindString(1,wardId);  
  statement.bindString(2,houseNumber); 
  statement.executeInsert(); 
  </code></pre>
  
  <p>and the values inserted are houseId=bp,wardId=199,houseNumber=Test</p>
  
  <p>and I got the following error on insertion </p>
  
  <p><strong>: android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed</strong></p>
  
  <p>I can't insert even a single row in this table</p>
  
  <p>Plz help.</p>