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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:30:40+00:00 2026-06-15T09:30:40+00:00

I am getting this error while executing my android app. I have created the

  • 0

I am getting this error while executing my android app. I have created the SQLite database in a file called MySQLitehelper.java which has the following lines for creating the tables:

 public static final String COLUMN_ID = "GWid";
  public static final String COLUMN_DATE = "DateGWU";
  public static final String COLUMN_LOCATION = "location";
  public static final String COLUMN_TIME = "time";
  
  public static final String TABLE_NAME = "UPDTable";

  private static final String DATABASE_NAME = "UPDdb_version6";
  private static final int DATABASE_VERSION = 6;
  
  private final Context context;
  GetSet getset = new GetSet();
  public void GetIdForGwid(GetSet get)
  {
     getset=get; 
  }
 
  // Database creation sql statement
  private static final String DATABASE_CREATE = "CREATE TABLE " + TABLE_NAME +
                                " (" +COLUMN_ID+ " integer," + COLUMN_DATE + "VARCHAR," +
                                COLUMN_LOCATION+" VARCHAR," +COLUMN_TIME +" VARCHAR);";
  
  private static final String DATABASE_INSERT = "INSERT INTO " +TABLE_NAME +
                                                " Values (47688507,'DEC-07-2012','MARVIN 203','20:00');";
 

In the same file i have the statements that execute my SQL SELECT query but give me the exception no such column found DateGWU

public Cursor getRecord() throws SQLException
{
        Cursor mCursor =
        db.query(true, TABLE_NAME, new String[] {COLUMN_ID,
        COLUMN_DATE, COLUMN_LOCATION, COLUMN_TIME},
        COLUMN_ID + "= 47688507", null, null, null, null, null);   //HARDCODED. Please make it dynamic
        if (mCursor != null) 
        {
            mCursor.moveToFirst();
        }
 return mCursor;
 }

I’m kinda stuck and don’t know where am I going wrong.

LOGCAT

11-30 04:57:50.832: E/SQLiteLog(12912): (1) no such column: DateGWU
11-30 04:57:50.842: D/AndroidRuntime(12912): Shutting down VM
11-30 04:57:50.852: W/dalvikvm(12912): threadid=1: thread exiting with uncaught exception (group=0x40a70930)
11-30 04:57:50.952: E/AndroidRuntime(12912): FATAL EXCEPTION: main
11-30 04:57:50.952: E/AndroidRuntime(12912): android.database.sqlite.SQLiteException: no such column: DateGWU (code 1): , while compiling: SELECT DISTINCT GWid, DateGWU, location, time FROM UPDTable WHERE GWid= '47688507'
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:882)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at  android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:493)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1314)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1161)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1032)
11-30 04:57:50.952: E/AndroidRuntime(12912):    at com.example.upd.MySQLitehelper.getRecord(MySQLitehelper.java:125)
  • 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-15T09:30:41+00:00Added an answer on June 15, 2026 at 9:30 am

    Please Change Database Insert Statement

    private static final String DATABASE_INSERT = "INSERT INTO " +TABLE_NAME +  " (" +COLUMN_ID+ " ," + COLUMN_DATE + "," +
                                    COLUMN_LOCATION+" ," +COLUMN_TIME +" )"  +
                                                    " Values (47688507,'DEC-07-2012','MARVIN 203','20:00');";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting this error: java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:200) at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
I am getting this Error while executing my android application : Host is unresolved:
I am getting following error while executing my java code. What is this error
I am getting this error While running this LoadError: Expected /home/user/Desktop/Tripurari/myapp/app/models/host.rb to define Host##
I am getting this error while i am trying to upload a database that
I am getting this weird error while running cucumber test: ERROR Mongo::OperationFailure: Database command
I'm Getting this error in my development log while uploadify is uploading the file
Exception stack trace: java.lang.RuntimeException: An error occured while executing doInBackground() E/AndroidRuntime( 695): at android.os.AsyncTask$3.done(AsyncTask.java:200)
getting Error while executing this query , because column text may contain text with
i have created one android application that was connecting to sqlite database. and i

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.