AndroidBase
AndroidBase

Reputation: 41

Sqlite statement

Eclipse log complains:

Failure 1 (near "(": syntax error)

My statement is as follows:

String sql = "UPDATE History 
                 SET Latitude = '" + latitude + 
                 "', Longitude = '" + longitude + 
                 "', Altitude = '" + altitude +
                 "', Address = '" + address + 
                 "', Title = '" + title +
                 "', Remarks = '" + remarks +
                 "', strftime('%d-%m-%Y, %H:%M:%S', 'now', 'localtime') 
               WHERE _id = '" + lastID +"'";

Upvotes: 0

Views: 251

Answers (1)

user684934
user684934

Reputation:

You have a string value from the strftime function. You're not saving it as anything, and that's not legal in a UPDATE statement. You're probably missing

CurrentTime = strftime(...

Upvotes: 1

Related Questions