android.database.sqlite.SQLiteDatatypeMismatchException: datatype mismatch (code 20)

Stack Overflow | Carter Klein | 8 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Error inserting data into SQLite

    Stack Overflow | 8 months ago | Carter Klein
    android.database.sqlite.SQLiteDatatypeMismatchException: datatype mismatch (code 20)

    Root Cause Analysis

    1. android.database.sqlite.SQLiteDatatypeMismatchException

      datatype mismatch (code 20)

      at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId()
    2. Android Platform
      SQLiteDatabase.insertOrThrow
      1. android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
      2. android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:780)
      3. android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
      4. android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
      5. android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1471)
      6. android.database.sqlite.SQLiteDatabase.insertOrThrow(SQLiteDatabase.java:1367)
      6 frames
    3. carter.streakly
      MainActivity$11.onClick
      1. carter.streakly.DatabaseHelper.insertData(DatabaseHelper.java:43)
      2. carter.streakly.MainActivity$11.onClick(MainActivity.java:301)
      2 frames
    4. Android Platform
      ActivityThread.main
      1. android.view.View.performClick(View.java:5198)
      2. android.view.View$PerformClick.run(View.java:21147)
      3. android.os.Handler.handleCallback(Handler.java:739)
      4. android.os.Handler.dispatchMessage(Handler.java:95)
      5. android.os.Looper.loop(Looper.java:148)
      6. android.app.ActivityThread.main(ActivityThread.java:5417)
      6 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      2 frames