Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
06-20-2012 02:13 AM
My Application uses a SqLite database to store data. But once the Sqlite is created by the application, the user can just close the application, browse the filesystem to reach the .db file and then delete it.
I want to know if there is any way i can prevent the user from deleting the .db in such a way. Only the application should be able to delete the database.
Something like what we have in windows wherein if a program or software is using a file and then we try maually deleting it, we get a dialog saying "Unable to delete. It is being used by another person or program".
Solved! Go to Solution.
06-20-2012 03:34 AM
Welcome to the forums.
I beleive if your application is currently using the database, it will not be deleted for the same reason as in Windows, i.e. the OS knows that someone is using the file and will lock it then. But I have not specifically tested this so I suggest that you try it yourself.
But just like Windows, I don't believe that there is a way to stop the user deleting it when the application is not running (i.e. the file is not busy). And of course you can't stop the user taking the SD Card out.
How big is this database? You might be able to copy it as a byte array to PersistentStore, and so have a backup copy.
06-20-2012 05:20 AM
I have tested it..and i can say that in blackberry, you can delete the file, while still in use.
The Database is quite huge and Persistent storage may not be an option.
Any other ideas?
06-20-2012 06:35 AM
" have tested it..and I can say that in blackberry, you can delete the file, while still in use. "
That is a bit scary.....
I have, when I had sequential files I didn't want deleted, marked them as hidden, but I'm not sure you can do that to an SQL database.
Aside from that, sorry no idea, hope someone else has.