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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:11:17+00:00 2026-06-03T11:11:17+00:00

I must be doing something stupid here, because I have some very similar code

  • 0

I must be doing something stupid here, because I have some very similar code that works fine. When I compile and run the code below, I get an android.database.sqlite.SQLiteException:

05-05 20:00:29.524: E/AndroidRuntime(12785): Caused by: android.database.sqlite.SQLiteException: near "VALUES": syntax error: , while compiling: INSERT INTO bookmarks_6616 (VALUES (

That’s the whole error. It’s as if an incomplete insert is being sent. The strangest thing is that the exception is being generated the first call to InsertHelper.getColumnIndex() which shouldn’t be compiling an insertion anyhow.

The code is below. I have checked, and the table does exist (it is empty, and created a few lines before.) The keys also have the correct values. I will probably switch back to using insert() without an insertHelper, but I would like to be able to figure out this bug! Any help is appreciated.

    InsertHelper ihelper = new InsertHelper(dbHelper.mDb, tableName);

    //Populate the DB table
    final int idColumn = ihelper.getColumnIndex(BooksDbAdapter.KEY_CHID);
    final int titleColumn = ihelper.getColumnIndex(BooksDbAdapter.KEY_CHAPTERTITLE);
    final int urlColumn = ihelper.getColumnIndex(BooksDbAdapter.KEY_CHAPTERURL);
    final int durationColumn = ihelper.getColumnIndex(BooksDbAdapter.KEY_DURATION);

    for (RSSMessage msg : messages){
        if (msg.imageMessage()) {
            dbHelper.updateImage(lvid, msg.getImageURL());
        } else {
            ihelper.prepareForInsert();
            ihelper.bind(idColumn, chid);
            ihelper.bind(titleColumn, msg.getChapterTitle());
            ihelper.bind(urlColumn, msg.getChapterURL());
            ihelper.bind(durationColumn, msg.getDuration());
            ihelper.execute();

            chid++;
        }
    }
    ihelper.close();
  • 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-03T11:11:18+00:00Added an answer on June 3, 2026 at 11:11 am

    It turns out that the problem was simply a bad table name. Apparently, the error showed up as being on getColumnIndex() because no matching column could be found. I’m still not sure why the error showed an incomplete INSERT statement, but perhaps the compiler delayed the call to getColumnIndex until the results were needed.

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

Sidebar

Related Questions

I must be doing some stupid mistake. I have a server that returns the
I think I must be doing something wrong here because my code only sent
I must be doing something wrong here (because really, what are the chances of
I must be doing something really stupid here, but I've been beating my head
I'm must be doing something stupid, because I can't make this simple animate work
I must be doing something wrong because I have replicated many answers on this
I must be doing something totally stupid here, but I can't get the PLCrashReporter
This must be something utterly stupid that I've done or am doing, but I
I must be doing something wrong, but my code is very basic, hardly even
I think I must be doing something stupid. Unfortunately, due to the nature of

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.