开发者

Sqlite statement

开发者 https://www.devze.com 2023-03-19 10:57 出处:网络
Eclipse log complains: Failure 1 (near \"(\": syntax error) My statement is as follows: String sql = \"UPDATE History

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

精彩评论

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