I create my database using sqliteadmin (version 0.8.3.2),I place this file into my asset directory and then copy this file into
data/data/mypackage/databases/mydb
,its ok.now when I am trying to open this file getting exception as android.database.sqlite.SQLiteException: unable to open database file
,below code i am using to open the mydb.
private static final String DB_PATH = "/data/data/src.com/databases/";
private static final String DB_NAME = "mydb";
String mypath = DB_PATH + DB_NAME;
try{
dbBF = SQLiteDatabase.openDatabase(mypath, null, SQLiteDatabase.OPEN_READWRITE);
}catch(Exception ex)
{System.out.print("H![enter image description here][1]ere is an Exception"+ex);
}
Cursor cur = dbBF.rawQuery("SELECT * FROM"+"myTable" , null);