为什么我在Eclipse的文件浏览器中看不到SQLite Manager的数据库结构? 当我在文件浏览器中单击我的数据库时,SQLite管理器按钮被禁用 我必须先从Eclipse中取出一个DB,然后使用SQLite数据库浏览器打开它。
这是我的创建数据库代码:
private static final String DB_NAME = "uniDB_";
private static final String Memo_Table = "Memo";
private static final String Memo_ID = "_ID";
private static final String Memo_Name = "MemoName";
private static final String Memo_PW = "MemoPW";
private static final String Main_Type = "MainType";
private static final String Sec_Type = "SecType";
private static final String Main_ID = "MainID";
private static final String Sec_ID = "SecID";
private static final String Text_Table = "Txt";
private static final String Text_Name = "TxtMemoName";
private static final String Pic_Table = "Pic";
private static final String Pic_Name = "PicMemoName";
private static final String MemoDB_CREATE = "Create table Memo (_ID INTEGER PRIMARY KEY AUTOINCREMENT, MemoName TEXT, MemoPW TEXT, MainType TEXT, SecType TEXT, MainID TEXT, SecID TEXT)";
private static final String PicDB_CREATE = "Create table Pic (_ID INTEGER PRIMARY KEY AUTOINCREMENT, PicMemoName TEXT)";
private static final String TxtDB_CREATE = "Create table Txt (_ID INTEGER PRIMARY KEY AUTOINCREMENT, TxtMemoName TEXT)";
...
private static class DatabaseHelper extends SQLiteOpenHelper {
public DatabaseHelper(Context context) {
super(context, DB_NAME, null , 1); //call constructor's superclass
// TODO Auto-generated constructor stub
}
...
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
db.execSQL(MemoDB_CREATE);
db.execSQL(PicDB_CREATE);
db.execSQL(TxtDB_CREATE);
}
}
非常感谢您的帮助