This is the error i get:
**ERROR/Database(13775): Failure 1 (near "s": syntax error)**
while i try to execute the following query:
myDB.execSQL("INSERT INTO " + tableName + " (" + column[1] + "," + column[2] + "," + column[3] + "," + column[4] + ","
+ column[5] + "," + column[6] + "," + column[7] + "," + column[8] + ",type ) VALUES('" + url + "','" + title + "','" + summary + "','" + imageUrl + "','" + completeStoryUrl + "','" + date + "','" + imageString + "','" + body + "','" + type + "')");
These values are being stored in Db by parsing an xml having RSS feeds like objects. few items are stored but on some i get this exception. Is there a problem of query of the data being sent to tha query..??? Any help is appreciated.
Without seeing the actual query that is being executed, I would guess that one of the fields being inserted contains a ” character, which is breaking the SQL statement.
for example imagine if the value of summary was
As Michalis said, you need to escape the values being inserted ( replace any special characters )
If I were you, I would log the actual string query that is being executed. Then take a look in logcat at it and you should see why it is failing.