当我尝试更新Android应用中的数据库行时出现错误。它似乎认为没有名为last_update_time
的列,但我绝对相信有一个。我已经创建并重新创建了几次数据库并检查了我的SQL语句,并且肯定有一个这个名称的列。
一些日志声明:
02-13 14:31:09.508: I/Database(674): sqlite returned: error code = 1, msg = no such column: last_update_time
02-13 14:31:09.508: E/Database(674): Error updating icon=http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png last_update_time=1329172268604 distance=36.571194 _id=ba1f46d735746b66658bb970e842d647ea7f92d8 vicinity=3561 El Camino Real #75,
Santa Clara name=Paris Baguette longitude=-121.994223 latitude=37.353605 types=bakery store food establishment reference=
CnRlAAAAddN_wZD9BvHL0LCzxJUgzf_QcaFUVcIyDRPf26pRyrUVJ1yVkUkke420FEhwkaNfsZedlqrhaRJJwelopAYWEPRr7mAL81vivvlntYSSqS0xUxke655C7ay4AyOpaCO1BE7XbDmQSTV7WINl8c7W0hIQ_DXJBG0pSWe3P1gaJQOSuRoURMAs2eYOIzExARulJ7B7k5EK97c using UPDATE places SET icon=?,
last_update_time=?, distance=?, _id=?, vicinity=?, name=?, longitude=?, latitude=?, types=?, reference=? WHERE _id = ba1f46d735746b66658bb970e842d647ea7f92d8
02-13 14:31:09.518: E/AndroidRuntime(674): android.database.sqlite.SQLiteException: no such column: last_update_time: , while compiling: UPDATE places SET icon=?,
last_update_time=?, distance=?, _id=?, vicinity=?, name=?, longitude=?, latitude=?, types=?, reference=? WHERE _id = ba1f46d735746b66658bb970e842d647ea7f92d8
答案 0 :(得分:6)
只是在黑暗中拍摄......但看起来你在创建表语句中缺少一个逗号。