Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8059467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:40:47+00:00 2026-06-05T09:40:47+00:00

My table structure is as shown below CREATE TABLE MCARE_HOUSE_DETAILS ( HOUSE_DTL_ID VARCHAR(20) NOT

  • 0

My table structure is as shown below

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))

Insert query block is as below

  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(); 

and the values inserted are houseId=bp,wardId=199,houseNumber=Test

and I got the following error on insertion

: android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed

I can’t insert even a single row in this table

Plz help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:40:48+00:00Added an answer on June 5, 2026 at 9:40 am

    It’s because you set the HOUSE_NO to “”. Your statement doesn’t bind parameter #3.

    statement.bindString(1,houseId);  
    statement.bindString(1,wardId);  
    statement.bindString(2,houseNumber);
    

    Try this one:

    statement.bindString(1,houseId);  
    statement.bindString(2,wardId);  
    statement.bindString(3,houseNumber);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My table structure is below: CREATE TABLE [ACC].[Document]( [DocumentID] [int] IDENTITY(1,1) NOT NULL, [Date]
My table structure is: TABLE `licenses` ( `id` int(11) NOT NULL auto_increment, `code` varchar(30)
Simplified Table structure: CREATE TABLE IF NOT EXISTS `hpa` ( `id` bigint(15) NOT NULL
I have a database table that has a structure like the one shown below:
I have a USER table structure as shown below: id parent_id userName 10 01
I have a table structure like the one shown below: <table id=result> <tr> <td
i would get details from two MySQL tables tables structure as shown table:App |AppID|AppName|AppType|
My table structure is below : MyTable (ID Int, AccID1 Int, AccID2 Int, AccID3
I have a structure as shown below. typedef struct { attribute_code_t field_id; uint8_t instance_num;
I've got four tables. The structure of these tables is shown below (I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.