Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums on April 1st. 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
12-17-2012 01:22 AM
I want to create sqlite db through my app.
I tried the below code but it returns false.. so how to create a DB and where does the default db file exists.?
db = QSqlDatabase::addDatabase("QSQLITE");
// Open databasee
bool dbOpen = db.open(); <- dbOpen is false here
12-17-2012 02:17 AM
In my application I created a SQLite database using an external application. In my code I check if a database file is present and if that's not the case, I copy the default database from the assets folder. It's pretty much the same logic as used in the quotes sample, so you might want to check that.
If you insist on completely creating your SQLite database in your code then I am not much of help I'm afraid.
12-17-2012 04:43 AM
I create the database like this:
QString databaseName = "dbname.db"; QString dataFolder = QDir::homePath(); QString databaseFileName = dataFolder + "/" + databaseName; QFile databaseFile(databaseFileName); databaseFile.open(QIODevice::ReadWrite); sqlDataAccess = new SqlDataAccess(databaseFileName);
took the code from some sample and modified it a bit.