Thursday 15 September 2011

(Android )Keep getting errors on SQL Statement -


I'm having trouble creating a table in my Android application

06-21 23: 29: 58.490: E / SQLLog Log (1951): (1) Near "Index": Syntax Error 06- 21 23: 29: 58.820: E / Infiniti Database (1951): Index Table Failed 06- 21 23: 29: 58.820: E / Infinitables (1971): Android databases. Sqlite.SQLiteException: Near "index": syntax error (code1):, when compiling: Create table index (_id integer primary key) < / Code>

This is a "test" statement that I am using as my complete statement which is not just playing the ball. I'm useless with SQL - is it me or computer?

Here is the JavaScript snippet:

  // is the initial index table used to create ... @ Override Crate on Public Zero (SQLiteDatabase DB) {Log D. (TAG_NAME, "Now making index table"); {Last string INDEX_TABLE_CREATE = "create table" + INDEX_TABLE_NAME + "(" + COL_ID + "the whole primary key" + ")" try "; db.execSQL (INDEX_TABLE_CREATE); log D. (TAG_NAME," created new index table GOLD (Eclipse E) {Log.e (TAG_NAME, "Index table is making unsuccessful", e);}}    

You can not use the name "table" This is a keyword in sqlite, please retrieve this link

No comments:

Post a Comment