开发者

Sqlite statement

Eclipse log complains:

Failure 1 (near "(": syntax error)

My statement is as follows:

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


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(...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜