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

  • Home
  • SEARCH
  • 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 9011473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:44:30+00:00 2026-06-16T02:44:30+00:00

I have this database structure: protected static final String Buildings = CREATE TABLE +

  • 0

I have this database structure:

protected static final String Buildings =
        "CREATE TABLE " 
                + Building.BUILDING_TAG + " ( " 
                + Building.ID + " LONG PRIMARY KEY, "
                + Building.NOME + " TEXT,"
                + Building.POSIZIONE + " TEXT, " 
                + Building.DESCRIZIONE + " TEXT, "
                + Building.DATA_C + " LONG, "
                + Building.DATA_U + " LONG, "
                + Building.LINK + " TEXT, "
                + Building.NUMERO_DI_PIANI + " INTEGER NOT NULL, "
                + Building.VERSIONE + " INTEGER, "
                + Building.FOTO + " TEXT, "
                + Building.GEOMETRIA + " TEXT "
                +");";

And I’m trying to insert this data:

id=6 
descrizione=nel mezzo del cammin di nostra vita 
data_creazione=1353904373000 
geometria=[[46074778,13234062],[46074778,13235521],[46073945,13235521],[46073885,13233976],[46074778,13234062],] 
versione=1 
link=http://www.caso.com/ 
nome=erferf 
foto= 
posizione=[46074332,13234748] 
data_update=1355731095000

Every time I delete the database from the simulator, and, in the code, I try to delete an eventual building with the same id.

Here is the error:

E/Database(16622): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
E/Database(16622):  at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
E/Database(16622):  at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61)
E/Database(16622):  at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1582)
E/Database(16622):  at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1426)

Can you help me?

  • 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-16T02:44:32+00:00Added an answer on June 16, 2026 at 2:44 am

    I was looking left when the error was at right.

    I forgot to save also the field numero_di_piani

    So stupid!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this database structure, SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO; CREATE TABLE IF NOT EXISTS `announces` (
I have this table structure on a SQL Server 2008 R2 database: CREATE TABLE
I have this database structure CREATE TABLE `productinfo` ( `ProductID` int(11) NOT NULL AUTO_INCREMENT,
I have created a table on an Oracle 10g database with this structure :
I have a database structure like this: • Insured table +-----------+--------------+-----+ | InsuredID |
I have this enormous database : # # Dropping tables # DROP TABLE IF
I have a table in database which has following structure(data) : +--------------------------+ Organization +--------------------------+
Could someone give me an idea how to create this database structure. Here is
I have this base class structure: Base: public abstract class BackgroundTask { protected readonly
Supposing I have this sqlite database structure: ID PRODUCT_NAME AVAILABILITY 1 foo 0 2

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.