Click here to Skip to main content
15,997,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am doing Mini project using SQLite database I want to store database in sdcard. Help me to store database in sdcard.
my code looks like -
Java
SQLiteDatabase myDB= null;
try {
	myDB = this.openOrCreateDatabase("MAS", MODE_PRIVATE, null);
}
catch(Exception e)
{
 Toast.makeText(this, "Error in opening database", Toast.LENGTH_LONG).show();
}
finally 
{
 if (myDB != null)
  myDB.close();
}

Please help me.
Posted
Updated 10-Dec-13 6:41am
v2
Comments
[no name] 10-Dec-13 13:41pm    
Does the code ends in problem? If yes, any error message available?

1 solution

sounds good that you are using external database, because it is easier for you to modify, copy and paste the database in some other place too.

To do that you need to download sqlite manager and there you will have the good UI interface for creating and modifying the existing database. To know how to do that see this Link[^]

also go thru this link Link2[^]

try these links and let us know if it works or not, if not we are here to help you again.


Thanks
Ganesh
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900