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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:31:49+00:00 2026-05-27T03:31:49+00:00

My application keeps forceclosing when I try to view the class that is holding

  • 0

My application keeps forceclosing when I try to view the class that is holding my database holder. I get an error on the onCreate() method of my database. I have one application that uses this same database writin pretty much the same way the only difference is that I am trying to click through a menu option instead of a regular button, I don’t know if that will effect the problem in anyway. If some one could tell me what is wrong that would be nice. thank you.

LOG CAT ERROR UPDATED

11-28 22:06:01.951: E/AndroidRuntime(19544): FATAL EXCEPTION: main
11-28 22:06:01.951: E/AndroidRuntime(19544): java.lang.RuntimeException: Unable to start activity ComponentInfo{http.www.hotapp.com.timeandlocation/http.www.hotapp.com.timeandlocation.db.DatabaseViewer}: android.database.sqlite.SQLiteException: near "IS": syntax error: CREATE TABLE dbtable (_id INTEGER PRIMARY KEY AUTOINCREMENT, latitude TEXT IS NOT NULL, longitude TEXT IS NOT NULL, time TEXT IS NOT NULL, date TEXT IS NOT NULL);
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.os.Handler.dispatchMessage(Handler.java:99)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.os.Looper.loop(Looper.java:123)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.app.ActivityThread.main(ActivityThread.java:4627)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at java.lang.reflect.Method.invokeNative(Native Method)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at java.lang.reflect.Method.invoke(Method.java:521)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at dalvik.system.NativeStart.main(Native Method)
11-28 22:06:01.951: E/AndroidRuntime(19544): Caused by: android.database.sqlite.SQLiteException: near "IS": syntax error: CREATE TABLE dbtable (_id INTEGER PRIMARY KEY AUTOINCREMENT, latitude TEXT IS NOT NULL, longitude TEXT IS NOT NULL, time TEXT IS NOT NULL, date TEXT IS NOT NULL);
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1727)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at http.www.hotapp.com.timeandlocation.db.Database$DatabaseHelper.onCreate(Database.java:35)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:106)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at http.www.hotapp.com.timeandlocation.db.Database.open(Database.java:63)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at http.www.hotapp.com.timeandlocation.db.DatabaseViewer.onCreate(DatabaseViewer.java:26)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-28 22:06:01.951: E/AndroidRuntime(19544):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)

onCreate METHOD INSIDE DATABASE CLASS

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


    }

VIEWER CLASS

public class DatabaseViewer extends Activity{

private TextView dbla;
private TextView dblo;
private TextView dbti;
private TextView dbda;

public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.database);


    dbln = (TextView) findViewById(R.id.dblo);
    dbti = (TextView) findViewById(R.id.dbti);
    dbda = (TextView) findViewById(R.id.dbda);

    dbla = (TextView) findViewById(R.id.dbla);
    Database info = new Database(this);
    info.open();
    String data = info.latData();
    info.close();
    dblt.setText(data);
}

 }
  • 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-27T03:31:49+00:00Added an answer on May 27, 2026 at 3:31 am

    Try this:

    1) remove “IS”

    2) remove ‘;’ at the end

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

Sidebar

Related Questions

When debugging a VB6 application, I have noticed that the VB6 IDE keeps any
I am creating a simple application that keeps track of coins. I have a
I have situation where a publisher application essentially keeps a view model up to
My application keeps running into Timeout Expired SqlExceptions. The thing is that this query
I'm trying to make an application that keeps an object model in sync with
i have written an application, but for some reason it keeps peaking at 100%.
I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps
We have a 64bit C#/.Net3.0 application that runs on a 64bit Windows server. From
I have a Google Appengine/Guice/Wicket Application. My problem is that due to the mapping
Native heap size of my application keeps increasing and finally crashes. I have a

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.