Android ContentValues的用法
来源:互联网 发布:什么是java设计模式 编辑:程序博客网 时间:2024/05/08 19:10
ContentValues和Hash Table都是一种存储的机制。两者的区别在于,contentValues只能存储基本类型的数据,String,int之类的,不能存储对象,而Hash Table却可以存储对象。
把数据插入数据库中时,首先要有一个ContentValues的对象:
ContentValues contentValues = new ContentValues();
contentValues.put(key,values);
SQLiteDataBase sdb;
sdb.insert(database_name,null,initialValues);
成功插入则返回记录的id,否则返回-1。
0 0
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- 【Android】ContentValues的用法
- Android ContentValues的用法
- Android中的ContentValues用法
- Android中ContentValues用法
- ContentValues的用法
- ContentValues的用法
- ContentValues的用法
- ContentValues的用法
- Uri中ContentValues的用法+Android中ContentProvider总结
- 关于Uri中ContentValues的用法
- 关于Uri中ContentValues的用法
- 关于Uri中ContentValues的用法
- C语言实现面向对象思想
- 组合数的两种计算方法(递推,对数)
- JDK8源码之Iterator顺序遍历迭代器
- 学习Linux的第一天
- android判断service或者process是否运行
- Android ContentValues的用法
- Spring Cloud系列五 之 服务网关
- 视频播放器(SurfaceView+MediaPlayer+SeekBar,VideoView+MediaController)
- 安卓漫漫路之AndroidManifest权限大全.
- 正则表达式2(常用)
- Opencv2系列学习笔记4(灰度直方图)
- 对目录内所有文件(包括子文件夹文件)读取处理
- 设计模式-单例模式
- POJ-3087 Shuffle'm Up