源程序是这样的。
public class MyDatabaseHelper extends SQLiteOpenHelper{
final String CREATE_TABLE_SQL =
"create table dict(_id integer primary key autoincrement , word , detail)";
/**
* @param context
* @param name
* @param version
*/
public MyDatabaseHelper(Context context, String name, int version)
{
super(context, name, null, version);
} @Override
public void onCreate(SQLiteDatabase db)
{
// 第一个使用数据库时自动建表
db.execSQL(CREATE_TABLE_SQL);
} @Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
{
System.out.println("--------onUpdate Called--------"
+ oldVersion + "--->" + newVersion);
}
}这条语句create table dict(_id integer primary key autoincrement , word , detail)
word 和detail怎么没指定类型的?
public class MyDatabaseHelper extends SQLiteOpenHelper{
final String CREATE_TABLE_SQL =
"create table dict(_id integer primary key autoincrement , word , detail)";
/**
* @param context
* @param name
* @param version
*/
public MyDatabaseHelper(Context context, String name, int version)
{
super(context, name, null, version);
} @Override
public void onCreate(SQLiteDatabase db)
{
// 第一个使用数据库时自动建表
db.execSQL(CREATE_TABLE_SQL);
} @Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
{
System.out.println("--------onUpdate Called--------"
+ oldVersion + "--->" + newVersion);
}
}这条语句create table dict(_id integer primary key autoincrement , word , detail)
word 和detail怎么没指定类型的?
解决方案 »
- 报错
- android怎么调用系统自带的图库打开指定目录的相册
- SIP服务器(Kamailio) 无法使用公网IP
- google 语音搜索API
- android 关于用感应技术实现一个帧动画效果,请高手们指点指点
- android支持希伯来语吗?
- 如何响应按键来关闭WindowManger生成的FloatView
- View
- 关于Android微信分享的
- 一个小型的计算器,代码应该没问题但就是程序运行的时候****has stopped,不知道哪里错了
- imageView.setLayoutParams(new LayoutParams(240, 320));报强制类型转换错误,why?
- 新浪微博Android的demo还是有问题
这是SQLite特有的 其实本质上SQLite就是文件读写。
http://zhidao.baidu.com/question/81346967.html