When I try to run my application of submition data in SQLite there is an error 1 syntax error

Asfand CataLyst

My query is

String CREATE = "CREATE TABLE" +DATABASE_Bussiness+ "(" + KEY_ID +
    "INTEGER primary key AUTOINCREMENT, " + A_DATE + "TEXT,
    " + A_NAME+ "TEXT, " +A_AMOUNT+ "INTEGER);";
    db.execSQL(CREATE);
IntelliJ Amiya

You will receive

android.database.sqlite.SQLiteException

A SQLite exception that indicates there was an error with SQL parsing or execution. Rectify your query. Need Spacing.

Try with

String CREATE ="CREATE TABLE " + DATABASE_Bussiness + "("
                + KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
                + A_DATE + " TEXT, "
                + A_NAME + " TEXT, "
                + A_AMOUNT + " INTEGER "
                + ")";

Clean-Rebuild-Uninstall App and Run again.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

TOP Ranking

HotTag

Archive