当前位置:网站首页>Android uses sqliteopenhelper to flash back
Android uses sqliteopenhelper to flash back
2022-07-04 18:10:00 【Blue static cloud】
problem :
I'm sure I'm right , however app Just keep dodging
Try :
Delete app, reinstall
Example :
@Override
public void onCreate(SQLiteDatabase db) {
// If there is group surface , Then delete the table
String drop_sql = "DROP TABLE IF EXISTS " + CHAT_GROUP + ";";
db.execSQL(drop_sql);
// establish group surface
String create_sql = "CREATE TABLE IF NOT EXISTS " + CHAT_GROUP + "("
+ "id INTEGER PRIMARY KEY AUTOINCREMENT,"
+ "group_id VARCHAR NOT NULL,"
+ "chat_type INTEGER DEFAULT NULL"
+ ");";
db.execSQL(create_sql);
}
Add a new field id, Rerun fetch id Print , Flash back
String sql = String.format("select id,group_id,update_time" +
" from %s where %s;", CHAT_GROUP, condition);
onCreate Timing of invocation
边栏推荐
- How to test MDM products
- gatling 之性能测试
- TCP两次挥手,你见过吗?那四次握手呢?
- Implementation of shell script replacement function
- 内核中时间相关的知识介绍
- To sort out messy header files, I use include what you use
- [HCIA continuous update] network management and operation and maintenance
- “在越南,钱就像躺在街上”
- What is low code development?
- android使用SQLiteOpenHelper闪退
猜你喜欢
Recast of recastnavigation
Oppo Xiaobu launched Obert, a large pre training model, and promoted to the top of kgclue
The block:usdd has strong growth momentum
What if Kaili can't input Chinese???
Is it science or metaphysics to rename a listed company?
7 RSA Cryptosystem
CocosCreator事件派发使用
解决el-input输入框.number数字输入问题,去掉type=“number“后面箭头问题也可以用这种方法代替
简单易用的地图可视化
[HCIA continuous update] overview of WLAN workflow
随机推荐
About the pit of firewall opening 8848 when Nacos is started
[system analyst's road] Chapter 7 double disk system design (structured development method)
The block:usdd has strong growth momentum
Pytorch深度学习之环境搭建
Flask lightweight web framework
The top half and bottom half of the interrupt are introduced and the implementation method (tasklet and work queue)
【Hot100】31. 下一个排列
Interpretation of data security governance capability evaluation framework 2.0, the fourth batch of DSG evaluation collection
Mathematical analysis_ Notes_ Chapter 7: differential calculus of multivariate functions
LD_LIBRARY_PATH 环境变量设置
Image retrieval
Master the use of auto analyze in data warehouse
Dynamic programming stock problem comparison
超标量处理器设计 姚永斌 第6章 指令解码 摘录
要上市的威马,依然给不了百度信心
大规模服务异常日志检索
[HCIA continuous update] network management and operation and maintenance
股价大跌、市值缩水,奈雪推出虚拟股票,深陷擦边球争议
估值900亿,超级芯片IPO来了
Initial experience of domestic database tidb: simple and easy to use, quick to start