小编Kar*_*day的帖子

如何在 Android SQLite 中的现有表上添加列?

如何在现有表 LOGIN 中添加列。这是我的示例代码。

这是我的 DataBaseAdapter 类:

public class DataBaseHelper extends SQLiteOpenHelper
{
    public DataBaseHelper(Context context, String name,CursorFactory factory, int version) 
    {
               super(context, name, factory, version);
    }
    // Called when no database exists in disk and the helper class needs
    // to create a new one.
    @Override
    public void onCreate(SQLiteDatabase _db) 
    {
            _db.execSQL(LoginDataBaseAdapter.DATABASE_CREATE);

    }
    // Called when there is a database version mismatch meaning that the version
    // of the database on disk needs to be upgraded to the current version. …
Run Code Online (Sandbox Code Playgroud)

java eclipse android android-sqlite

5
推荐指数
1
解决办法
6537
查看次数

标签 统计

android ×1

android-sqlite ×1

eclipse ×1

java ×1