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 9115479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:26:33+00:00 2026-06-17T04:26:33+00:00

I am using SQLite on my app, and I am creating some table, here

  • 0

I am using SQLite on my app, and I am creating some table, here is the code:

    db.execSQL("CREATE TABLE IF NOT EXISTS " + GAMES_HISTORY_TABLE+ " (" +
        GAME_KEY + " INTEGER PRIMARY KEY AUTOINCREMENT, " + 
        RIGHT_DRILLS + "INTEGER NOT NULL, " + 
        NUM_OF_DRILLS + "INTEGER NOT NULL, " + 
        GAME_DATE + "DATE);"
   );

And here is the code of the record adding:

public long addScore(int totalDrills, int numberOfRightDrills) {
    ContentValues cv = new ContentValues();
    cv.put(RIGHT_DRILLS, numberOfRightDrills);
    cv.put(NUM_OF_DRILLS, totalDrills);
    Date date = new Date();
    SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
    cv.put(GAME_DATE, dateFormat.format(date));
    return dataBase.insert(GAMES_HISTORY_TABLE, null, cv);

}

Here are the constant variable declaration (at the beginning of my code):

private static final String GAMES_HISTORY_TABLE = "scoers";
private static final String GAME_KEY = "game_id";
private static final String RIGHT_DRILLS = "number_of_rihgt_drill";
private static final String NUM_OF_DRILLS = "total_drill";
private static final String GAME_DATE = "game_date";

And I am getting this exception in the logCat:

01-13 20:13:45.485: D/szipinf(658): Initializing inflate state
01-13 20:13:47.375: D/szipinf(658): Initializing inflate state
01-13 20:13:47.485: I/Database(658): sqlite returned: error code = 1, msg = table scoers has no column named game_date
01-13 20:13:47.495: E/Database(658): Error inserting game_date=13-01-2013 20:13:47 total_drill=4 number_of_rihgt_drill=0
01-13 20:13:47.495: E/Database(658): android.database.sqlite.SQLiteException: table scoers has no column named game_date: , while compiling: INSERT INTO scoers(game_date, total_drill, number_of_rihgt_drill) VALUES(?, ?, ?);
01-13 20:13:47.495: E/Database(658):    at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
01-13 20:13:47.495: E/Database(658):    at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:92)
01-13 20:13:47.495: E/Database(658):    at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:65)
01-13 20:13:47.495: E/Database(658):    at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:83)
01-13 20:13:47.495: E/Database(658):    at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:41)
01-13 20:13:47.495: E/Database(658):    at android.database.sqlite.SQLiteDatabase.compileStatement(SQLiteDatabase.java:1149)
01-13 20:13:47.495: E/Database(658):    at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1569)
01-13 20:13:47.495: E/Database(658):    at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1426)
01-13 20:13:47.495: E/Database(658):    at com.simplemathgame.GameDB.addScore(GameDB.java:83)
01-13 20:13:47.495: E/Database(658):    at com.simplemathgame.Results.onCreate(Results.java:99)
01-13 20:13:47.495: E/Database(658):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-13 20:13:47.495: E/Database(658):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
01-13 20:13:47.495: E/Database(658):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-13 20:13:47.495: E/Database(658):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-13 20:13:47.495: E/Database(658):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-13 20:13:47.495: E/Database(658):    at android.os.Handler.dispatchMessage(Handler.java:99)
01-13 20:13:47.495: E/Database(658):    at android.os.Looper.loop(Looper.java:123)
01-13 20:13:47.495: E/Database(658):    at android.app.ActivityThread.main(ActivityThread.java:3683)
01-13 20:13:47.495: E/Database(658):    at java.lang.reflect.Method.invokeNative(Native Method)
01-13 20:13:47.495: E/Database(658):    at java.lang.reflect.Method.invoke(Method.java:507)
01-13 20:13:47.495: E/Database(658):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-13 20:13:47.495: E/Database(658):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-13 20:13:47.495: E/Database(658):    at dalvik.system.NativeStart.main(Native Method)
01-13 20:13:47.495: I/Database(658): sqlite returned: error code = 1, msg = no such column: sent
01-13 20:13:47.495: W/System.err(658): android.database.sqlite.SQLiteException: no such column: sent: , while compiling: SELECT sent FROM feedback
01-13 20:13:47.495: W/System.err(658):  at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:92)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:65)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:83)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:49)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:42)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1356)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1235)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1189)
01-13 20:13:47.506: W/System.err(658):  at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1271)
01-13 20:13:47.506: W/System.err(658):  at com.simplemathgame.GameDB.isFeedbackGiven(GameDB.java:117)
01-13 20:13:47.506: W/System.err(658):  at com.simplemathgame.Results.onCreate(Results.java:100)
01-13 20:13:47.506: W/System.err(658):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-13 20:13:47.506: W/System.err(658):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
01-13 20:13:47.506: W/System.err(658):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-13 20:13:47.506: W/System.err(658):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-13 20:13:47.515: W/System.err(658):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-13 20:13:47.515: W/System.err(658):  at android.os.Handler.dispatchMessage(Handler.java:99)
01-13 20:13:47.515: W/System.err(658):  at android.os.Looper.loop(Looper.java:123)
01-13 20:13:47.515: W/System.err(658):  at android.app.ActivityThread.main(ActivityThread.java:3683)
01-13 20:13:47.515: W/System.err(658):  at java.lang.reflect.Method.invokeNative(Native Method)
01-13 20:13:47.515: W/System.err(658):  at java.lang.reflect.Method.invoke(Method.java:507)
01-13 20:13:47.515: W/System.err(658):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-13 20:13:47.515: W/System.err(658):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-13 20:13:47.515: W/System.err(658):  at dalvik.system.NativeStart.main(Native Method)
01-13 20:13:47.525: W/db(658): problem

I have tried to change the names of the fields and the name of the table. I have another table in this DB.

What did I do wrong? Thanks!

  • 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-17T04:26:34+00:00Added an answer on June 17, 2026 at 4:26 am

    You need to add three spaces to your table schema then re-build it:

    db.execSQL("CREATE TABLE IF NOT EXISTS " + GAMES_HISTORY_TABLE+ " (" +
        GAME_KEY + " INTEGER PRIMARY KEY AUTOINCREMENT, " + 
        RIGHT_DRILLS + " INTEGER NOT NULL, " +  /* Add a space before "INTEGER... */
        NUM_OF_DRILLS + " INTEGER NOT NULL, " + /* Add a space before "INTEGER... */ 
        GAME_DATE + " DATE);"                   /* Add a space before "DATE... */
    );
    

    (FYI, GAMES_HISTORY_TABLE is apparently "scoers", I think that’s typo.)

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

Sidebar

Related Questions

I am using sqlite in my app, i want to edit some data in
I'm creating an app that has a database using sqlite. On my app I've
i am creating an app that needs a database. i created it using sqlite
I'm using sqlite in android app and I want to make insert in table
I am using sqlite in my iPhone app. I have some database operations, in
I am creating an app where I am using multiple sqlite databases. I was
I am creating an iOS app that reads data from a single SQLITE table
I am using sqlite database with my app following is my code which is
I am using Sqlite database in my iphone app. Here in my app i
I am creating an app that needs a database. I created it using sqlite

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.