The default is the package / database / test.db
SQLiteDatabase db = openOrCreateDatabase ("test.db", Context.MODE_PRIVATE, null);
I want to change the path to
/ mnt / sdcard / helloworld / test.db
can do it
------ Solution -------------------------------- ------------
this hope useful to you , you can store and read directional positions
http://blog.csdn.net/zcljy0318/article/details/7299223
------ Solution ------------------- -------------------------
private File xx = new File ("/ sdcard / wwq / cs.db") ;/ / specify the database path
private SQLiteDatabase sql;
sql = SQLiteDatabase.openOrCreateDatabase (xx, null);
Cursor csxx = sql.rawQuery ("SELECT JSH, JSBH, URL FROM CSXXB", null);
------ reference -------- -------------------------------
great God to ask, he said the article "SQLiteOpenHelper.java ) this class, create a database file path is used for incoming contex of getDatabasePath , this can not be modified ( at least I did not find ) . "
If the same security in two ways , I still use the default path to good
give suggestions , thank you
没有评论:
发表评论