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

  • Home
  • SEARCH
  • 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 8948375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:58:15+00:00 2026-06-15T12:58:15+00:00

I developing an android application that uses sqlite database. Primary Issue: * I keep

  • 0

I developing an android application that uses sqlite database.

  1. Primary Issue:
    *I keep facing this error no such column but I just cant find what is the cause to this problem. Any comments will be appreciated.*
  2. Secondary Issue:
    I wanted the application to check whether the user’s info is inside the database or not. If it doesn’t exist, I want the system to work on something. How to do the checking part? I tried something like below. But I’m not sure whether it works or not because of the no such column issue.

                    String values[] = helper.get_synccontentByEmailID(SettingConstant.EMAIL);
                if(!(values[0] == null)){
    
    
                }
    

–Database Class–

    public void onCreate(SQLiteDatabase db) {

    db.execSQL("CREATE TABLE synccontent (" + 
            "tableid INTEGER PRIMARY KEY AUTOINCREMENT, " +
            "emailid_sync TEXT " +
            "contentid TEXT," +
            "contentpath TEXT," +
            "filesize TEXT," +
            "createdtime TEXT,"+
            "createdate TIMESTAMP default current_timestamp);");
}
public String[] get_synccontentByEmailID(String emailid_sync){
    SQLiteDatabase myDB = null;
    String[] returnMsg = null;
    myDB = this.getReadableDatabase();

    Cursor c = myDB.rawQuery("SELECT tableid, emailid_sync, contentid, contentpath, filesize, createdtime" +
            " from synccontent where emailid_sync='"+emailid_sync+"' ", null);
    int emailid_syncColumn = c.getColumnIndex("emailid_sync");              
    int contentidColumn = c.getColumnIndex("contentid");
    int contentpathColumn = c.getColumnIndex("contentpath");
    int filesizeColumn = c.getColumnIndex("filesize");
    int createdtimeColumn = c.getColumnIndex("createdtime");

    if (c.moveToFirst()) {
        do {
            returnMsg = new String[5]; 
            String contentid = c.getString(contentidColumn);
            String contentpath = c.getString(contentpathColumn);
            String filesize = c.getString(filesizeColumn);
            String createdtime = c.getString(createdtimeColumn);

            returnMsg[0] = emailid_sync;
            returnMsg[1] = contentid;
            returnMsg[2] = contentpath;
            returnMsg[3] = filesize;
            returnMsg[4] = createdtime;

        } while (c.moveToNext());
    }

–Main Activity–

    syncButton = (Button) findViewById(R.id.sync_btn);
    syncButton.setOnClickListener(new View.OnClickListener(){
        @Override
        public void onClick(View v) {

                    String values[] = helper.get_synccontentByEmailID(SettingConstant.EMAIL);
                if(!(values[0] == null)){


                }





E/AndroidRuntime(4543): android.database.sqlite.SQLiteException: no such column: contentid: , while compiling: SELECT tableid, emailid_sync, contentid, contentpath, filesize, createdtime from wbm_synccontent where emailid_sync='testing@yahoo.com' 
  • 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-15T12:58:18+00:00Added an answer on June 15, 2026 at 12:58 pm

    There’s a missing comma after emailid_sync TEXT.

    db.execSQL("CREATE TABLE synccontent (" + 
                "tableid INTEGER PRIMARY KEY AUTOINCREMENT, " +
                "emailid_sync TEXT, " +
                "contentid TEXT," +
                "contentpath TEXT," +
                "filesize TEXT," +
                "createdtime TEXT,"+
                "createdate TIMESTAMP default current_timestamp);");
    

    That should fix the primary issue, solution to secondary was given in the other answer. I think it’s fine.

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

Sidebar

Related Questions

I am developing an android application which uses the SQLite database. In that case,
I am developing an android application that receives SMS messages and uses this data
I am developing an Android application that uses the geonames.org database. I only use
I'm currently developing an android application that uses sockets to connect to a local
I'm developing an Android 3.1 application that uses USB Host mode to communicate with
I'm developing an augmented reality application for Android that uses the phone's camera to
I am developing an Android application that uses OpenGL to render a 3D ball
I'm developing an Android application that uses a MapView . I'd like to run
I am developing an android application that uses a public key certificate to sign
Good evening. I'm developing an android application that uses Facebook SDK. I've no problem

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.