Reputation: 145
Why I can't see DB structure by SQLite Manager in file explorer in Eclipse?
When I click my DB in file explorer SQLite Manager button is disable.
I have to pull a DB out of Eclipse first and open it with SQLite Database Browser.
Here is my create DB code:
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);
}
}
Thank you very much for your help
Upvotes: 2
Views: 2236
Reputation: 33996
As your code I can't see the extension of the database so first give the extension of database
To see the structure of the database and data you have to install plugins for SQLite Manager you can get plugins from here
If you want to see the more information then see this
If already install plugins then you have to do below change May be your database extension is ".sqlite" if it is then change it with ".db"
Upvotes: 3