String sql = "UPDATE diary Set weather="+"\""+strWeather+"\""+" where(create_year=" + "\"" + strYear+ "\"" + " and create_month=" + "\"" + strMonth + "\""+ " and create_day=" + "\"" + strDay + "\"" + ")";
db.execSQL(sql);
调试时,出现错误,一直没有弄懂为什么,大家帮忙看看呢。03-25 13:50:03.713: E/Database(8567): Failure 21 (out of memory) on 0x0 when preparing 'delete from diary where(create_year="2012" and create_month="03" and create_day="25")'.
解决方案 »
- error: Error retrieving parent for item: No resource found that matches the give
- 关于Activity栈问题
- ap 如何获取pc的Ip地址?
- 照网上写的一段Touch事件,正常接收到ACTION_DOWN,但ACTION_UP偶尔才能接收到 这是为什么 谢谢
- arm-linux-androideabi-g++: error: CreateProcess: No such file or directory
- AlertDialog为什么不能通过new得到一个AlertDialog对象
- android绘图
- 有人知道怎么修改sharesdk框架的分享界面的样式吗?
- 关于Android 打包问题,在线等,急!!!
- Profile MyAppProject..., 这个Profile, 大家怎么译称?
- 安卓 如何实现类似于网页<frame/>标签的功能
- android 自定义menu 怎么修改高度
03-25 14:31:23.023: E/AndroidRuntime(10090): android.database.sqlite.SQLiteException: unknown error: UPDATE diary Set weather="晴" where(create_year="2012" and create_month="03" and create_day="25")
String sql = "UPDATE diary Set weather="+"\""+strWeather+"\""+" where(create_year="
String sql = "UPDATE diary Set weather="+strWeather+" where(create_year="
不加引号情况是以下情况:
update diary Set weather=晴 where...
加引号情况为:
update diary Set weather="晴" where...
第二种才是对的吧。
UPDATE diary Set weather='晴' where(create_year='2012' and create_month='03' and create_day='25')