0
나는이 데이터베이스 구조가 있습니다안드로이드 SQLiteConstraintException : 오류 코드 19
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 "
+");";
을 그리고이 데이터를 삽입하기 위해 노력하고있어 :
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
때마다 내가 시뮬레이터에서 데이터베이스를 삭제하고 코드에서 동일한 ID를 가진 최종 건물을 삭제하려고합니다.
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)
당신이 날 도와 줄 수 : 여기
오류인가?
수천 개의 제약 조건이 없으므로 어느 것이 존중되지 않는지 빨리 알아 내야합니다. – njzk2