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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:44:03+00:00 2026-05-27T08:44:03+00:00

I’m working on an Android app that also involves databases and I’ve run across

  • 0

I’m working on an Android app that also involves databases and I’ve run across a very annoying bug. I’m working on an example taken from the web.

The example below works just fine (no logcat errors). HOWEVER if I try and change the content of the KEY Strings, it stops working.

E.g. if I change
KEY_LOCATION = “title” to KEY_LOCATION = “title1”, the whole DB crashes.

I’ve also tried increasing the DB version number with no success so far. Any help would be most appreciated.

    private static final String DATABASE_NAME="data";
private static final String DATABASE_TABLE="reminders";
private static final int DATABASE_VERSION=4;

public static final String KEY_LOCATION="title1";
public static final String KEY_BODY="body";
public static final String KEY_DATE_TIME="date_time_value";
public static final String KEY_ROW_ID="_id";

private DatabaseHelper mDbHelper;
private SQLiteDatabase db;

private static final String DATABASE_CREATE =
        "create table " + DATABASE_TABLE + " ( "+
                KEY_ROW_ID+ " integer primary key autoincrement, "+
                KEY_LOCATION+ " text not null, "+
                KEY_BODY+" text not null, "+
                KEY_DATE_TIME+ " text not null);";

private Context mContext;

public DbAdapter(Context c){
    mContext=c;
}


public DbAdapter open() throws android.database.SQLException{
    mDbHelper=new DatabaseHelper(mContext);
    db=mDbHelper.getWritableDatabase();
    return this;
}

public void close(){
    mDbHelper.close();
}

public long createReminder(String title, String body, String dateTime){
    ContentValues initialValues = new ContentValues();
    initialValues.put(KEY_LOCATION, title);
    initialValues.put(KEY_BODY, body);
    initialValues.put(KEY_DATE_TIME, dateTime);

    return db.insert(DATABASE_TABLE, null, initialValues);

}

………………

These are the errors that I’m getting:

    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:64)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at android.database.sqlite.SQLiteProgram.compileSql(SQLiteProgram.java:146)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1737)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1610)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at pirelli.app.dbadapter.PirelliDbAdapter.createReminder(PirelliDbAdapter.java:55)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at pirelli.app.dbadapter.PirelliDbAdapter.createReminder(PirelliDbAdapter.java:55)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at pirelli.app.HSEActivity$1.onClick(HSEActivity.java:149)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at android.view.View.performClick(View.java:3110)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at android.view.View$PerformClick.run(View.java:11934)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at android.os.Handler.handleCallback(Handler.java:587)
    11-29 21:43:02.722: E/SQLiteDatabase(2150):     at android.os.Handler.dispatchMessage(Handler.java:92)
  • 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-05-27T08:44:04+00:00Added an answer on May 27, 2026 at 8:44 am

    Try changing.

    private static final String DATABASE_TABLE="reminders";
    

    to

    private static final String DATABASE_TABLE="reminders2";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
i got an object with contents of html markup in it, for example: string

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.