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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:49:31+00:00 2026-06-15T23:49:31+00:00

i am getting this error : Caused by: android.database.sqlite.SQLiteException: near of: syntax error: CREATE

  • 0

i am getting this error :
” Caused by: android.database.sqlite.SQLiteException: near “of”: syntax error: CREATE TABLE List of Notes (_idINTEGER PRIMARY KEY AUTOINCREMENT, notes_nameTEXT NOT NULL notes_contentTEXT NOT NULL notes_timeTEXT NOT NULL); “

I am using this code:

 db.execSQL("CREATE TABLE " + DATABASE_TABLE + " (" + 
                        KEY_ROWID + "INTEGER PRIMARY KEY AUTOINCREMENT, " +
                        KEY_NAME + "TEXT NOT NULL " + 
                        KEY_CONTENT + "TEXT NOT NULL " +
                        KEY_TIME + "TEXT NOT NULL);"

                        );

This is my logcat:

  12-17 08:58:15.998: I/Database(515): sqlite returned: error code = 1, msg = near "of": syntax error
    12-17 08:58:15.998: E/Database(515): Failure 1 (near "of": syntax error) on 0x22ddf8 when preparing 'CREATE TABLE List of Notes (_idINTEGER PRIMARY KEY AUTOINCREMENT, notes_nameTEXT NOT NULL, notes_contentTEXT NOT NULL, notes_timeTEXT NOT NULL);'.
    12-17 08:58:16.060: D/AndroidRuntime(515): Shutting down VM
    12-17 08:58:16.068: W/dalvikvm(515): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
    12-17 08:58:16.088: E/AndroidRuntime(515): FATAL EXCEPTION: main
    12-17 08:58:16.088: E/AndroidRuntime(515): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.compilationofnotes.pragya/com.compilationofnotes.pragya.NotesView}: android.database.sqlite.SQLiteException: near "of": syntax error: CREATE TABLE List of Notes (_idINTEGER PRIMARY KEY AUTOINCREMENT, notes_nameTEXT NOT NULL, notes_contentTEXT NOT NULL, notes_timeTEXT NOT NULL);
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.os.Handler.dispatchMessage(Handler.java:99)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.os.Looper.loop(Looper.java:123)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.app.ActivityThread.main(ActivityThread.java:4627)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at java.lang.reflect.Method.invokeNative(Native Method)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at java.lang.reflect.Method.invoke(Method.java:521)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at dalvik.system.NativeStart.main(Native Method)
    12-17 08:58:16.088: E/AndroidRuntime(515): Caused by: android.database.sqlite.SQLiteException: near "of": syntax error: CREATE TABLE List of Notes (_idINTEGER PRIMARY KEY AUTOINCREMENT, notes_nameTEXT NOT NULL, notes_contentTEXT NOT NULL, notes_timeTEXT NOT NULL);
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.database.sqlite.SQLiteDatabase.native_execSQL(Native Method)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1727)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at com.compilationofnotes.pragya.SqlDatabase$DbHelper.onCreate(SqlDatabase.java:41)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:106)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at com.compilationofnotes.pragya.SqlDatabase.open(SqlDatabase.java:62)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at com.compilationofnotes.pragya.NotesView.onCreate(NotesView.java:23)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    12-17 08:58:16.088: E/AndroidRuntime(515):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    12-17 08:58:16.088: E/AndroidRuntime(515):  ... 11 more
    12-17 08:58:18.848: I/Process(515): Sending signal. PID: 515 SIG: 9

This is my new logcat:

12-17 09:27:25.535: D/AndroidRuntime(357): Shutting down VM
12-17 09:27:25.535: W/dalvikvm(357): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
12-17 09:27:25.578: E/AndroidRuntime(357): FATAL EXCEPTION: main
12-17 09:27:25.578: E/AndroidRuntime(357): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.compilationofnotes.pragya/com.compilationofnotes.pragya.NewNote}: java.lang.NullPointerException
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.os.Handler.dispatchMessage(Handler.java:99)
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.os.Looper.loop(Looper.java:123)
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.app.ActivityThread.main(ActivityThread.java:4627)
12-17 09:27:25.578: E/AndroidRuntime(357):  at java.lang.reflect.Method.invokeNative(Native Method)
12-17 09:27:25.578: E/AndroidRuntime(357):  at java.lang.reflect.Method.invoke(Method.java:521)
12-17 09:27:25.578: E/AndroidRuntime(357):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-17 09:27:25.578: E/AndroidRuntime(357):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-17 09:27:25.578: E/AndroidRuntime(357):  at dalvik.system.NativeStart.main(Native Method)
12-17 09:27:25.578: E/AndroidRuntime(357): Caused by: java.lang.NullPointerException
12-17 09:27:25.578: E/AndroidRuntime(357):  at com.compilationofnotes.pragya.NewNote.onCreate(NewNote.java:28)
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-17 09:27:25.578: E/AndroidRuntime(357):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-17 09:27:25.578: E/AndroidRuntime(357):  ... 11 more

Please help. Thanks in advance!

  • 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-15T23:49:32+00:00Added an answer on June 15, 2026 at 11:49 pm

    On top of the great advice in the other answer.

    CREATE TABLE List of Notes (
    

    A table name must be one word. Consider ListOfNames, List_of_Names, etc.

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

Sidebar

Related Questions

please help me. I'm getting this error: Caused by: android.database.sqlite.SQLiteException: near values: syntax error:
I'm getting this error when trying to access my webservice running inside tomcat. Caused
I am getting this error. Problem is that the caused by clause doesnt seem
I am getting this error from the debugger: ERROR/AndroidRuntime(10540): Caused by: java.lang.RuntimeException: Your content
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: Caused by: java.lang.RuntimeException: Your content must have a ListView
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
Getting this error when try to add an item to my repositories/context: Collection has
Am getting this error message and matched my brackets and couldn't find anything wrong.

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.