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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:12:54+00:00 2026-06-08T18:12:54+00:00

I am using SQLite app. My application is open opening up any other activity.

  • 0

I am using SQLite app. My application is open opening up any other activity.

Here is the code

    public class hotornot {
        public static final String KEY_ROWID = "_id";
        public static final String KEY_NAME = "persons_name";
        public static final String KEY_HOTNESS = "persons_hotness";
        private static final String DATABASE_NAME = "HotorNotdb";
        private static final String DATABASE_TABLE = "peopletable";
        private static final int DATABASE_VERSION = 1;
        private DbHelper ourHelper;
        private final Context ourcontext;
        private SQLiteDatabase ourDatabase;

        private static class DbHelper extends SQLiteOpenHelper {

            public DbHelper(Context context) {
                super(context, DATABASE_NAME, null, DATABASE_VERSION);
            }

            @Override
            public void onCreate(SQLiteDatabase db) {
                // TODO Auto-generated method stub
                db.execSQL("CREATE TABLE " + DATABASE_TABLE + " (" + KEY_ROWID
                        + " INTEGER PRIMARY KEY AUTOINCREMENT, " + KEY_NAME
                        + " TEXT NOT NULL, " + KEY_HOTNESS + " TEXT NOT NULL);"

                );
            }

            @Override
            public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
                // TODO Auto-generated method stub
                db.execSQL("DROP TABLE IF EXISTS " + DATABASE_TABLE);
                onCreate(db);
            }

        }

        public hotornot(Context c) {
            ourcontext = c;
        }

        public hotornot open() throws SQLException {
            ourHelper = new DbHelper(ourcontext);
            ourDatabase = ourHelper.getWritableDatabase();
            return this;
        }

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

        public Long createentry(String name, String hotness) {
            ContentValues cv = new ContentValues();
            cv.put(KEY_NAME, name);
            cv.put(KEY_HOTNESS, hotness);
            return ourDatabase.insert(DATABASE_TABLE, null, cv);
        }

        public String getdata() {
            // TODO Auto-generated method stub
            String[] columns = new String[] { KEY_ROWID, KEY_NAME, KEY_HOTNESS };
            Cursor c = ourDatabase.query(DATABASE_TABLE, columns, null, null, null,
                    null, null);
            String result = "";

            int iRow = c.getColumnIndex(KEY_ROWID);
            int iName = c.getColumnIndex(KEY_NAME);
            int iHotness = c.getColumnIndex(KEY_HOTNESS);

            for (c.moveToFirst(); !c.isAfterLast(); c.moveToNext()) {
                result = result + c.getString(iRow) + " " + c.getString(iName)
                        + " " + c.getString(iHotness) + "\n";
            }

            return result;
        }
    }

Here is the manifest file:

<activity
    android:name=".sqliteexample"
    android:label="@string/app_name" >
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

</activity>
<activity
    android:name=".sview"
    android:label="@string/app_name" >
    <intent-filter>
        <action android:name="org.sqlite.SVIEW" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

and the logcat:

07-25 12:38:12.349: ERROR/AndroidRuntime(323): Uncaught handler: thread main exiting due to uncaught exception
07-25 12:38:12.399: ERROR/AndroidRuntime(323): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.sqlite/org.sqlite.sview}: android.database.sqlite.SQLiteException: no such table: peopletable: , while compiling: SELECT _id, persons_name, persons_hotness FROM peopletable
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at   android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.os.Looper.loop(Looper.java:123)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.main(ActivityThread.java:4363)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at java.lang.reflect.Method.invokeNative(Native Method)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at java.lang.reflect.Method.invoke(Method.java:521)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at dalvik.system.NativeStart.main(Native Method)
07-25 12:38:12.399: ERROR/AndroidRuntime(323): Caused by: android.database.sqlite.SQLiteException: no such table: peopletable: , while compiling: SELECT _id, persons_name, persons_hotness FROM peopletable
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteProgram.native_compile(Native Method)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteProgram.compile(SQLiteProgram.java:110)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:49)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:49)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1221)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1108)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1066)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1143)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at org.sqlite.hotornot.getdata(hotornot.java:73)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at org.sqlite.sview.onCreate(sview.java:14)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
07-25 12:38:12.399: ERROR/AndroidRuntime(323):     ... 11 more
  • 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-08T18:12:56+00:00Added an answer on June 8, 2026 at 6:12 pm

    In your eclipse go to Window > Show View > File Explorer
    and check out in data > data > yourPackageName whether database exists or not, if not then you have to import database file in it.

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

Sidebar

Related Questions

I'm using an sqlite database in my app. I have this dbhelper class in
I maintain an application written in Borland C++ 6. This app is using SQLite
I'm developing an app and using SQLite, contentResolver and contentProvider. Application description My app
In my Android app, I want to use my existing sqlite database.I followed http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
I am using sqlite in my app, i want to edit some data in
I am using sqlite database for iphone app. but its crash on while loop
I'm developing a C# Window8 / WinRT app and I'm using SQLite-NET with the
I am working on I Phone app, In that I am using SQLITE database.
I have an app using a SQLite db, and I need the ability for
I am using the firefox sqlite manager to help me building an iphone app.

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.