SQLiteLog: (1) Near "Produse": Syntax Error
I Want to add data from another class into my database and I get this errors: 'SQLiteLog: (1) near 'Produse': syntax error' and 'SQLiteDatabase: Error inserting Pret=102.0 Ingr
Solution 1:
You should not use whitespaces in your column names.
change
public static String COLUMN_PRODUS = "Nume Produse";
into
public static String COLUMN_PRODUS = "NumeProduse";
Solution 2:
When you want column with white space in sqlite you should use ``. Instead of:
INSERT INTO table (column, column two) values...
you should use:
INSERT INTO table (column, 'column two') values...
The same when you create table.
Post a Comment for "SQLiteLog: (1) Near "Produse": Syntax Error"