What is the error?
Probably you have to add some include in your source. Perhaps
Qt Code:
#include <QtSql/QSqlError>To copy to clipboard, switch view to plain text mode
What is the error?
Probably you have to add some include in your source. Perhaps
Qt Code:
#include <QtSql/QSqlError>To copy to clipboard, switch view to plain text mode
A camel can go 14 days without drink,
I can't!!!
Hi
It seems you can run execute your application successfully. But DB is empty/volatile if you restart your qt application. am I right?
if yes,
Try this
Qt Code:
database->setDatabaseName("memory.db");
and use CREATE TABLE command rather than CREATE TABLE IF NOT EXISTS Contacts.
Thanks,
Vishnu
lam-ang (13th June 2011)
Hello there,
Thanks for helping me out, I appreciate it very much...its running fine now.
I hope it is okay if I have another question, how can I use another database like Mysql if my target is a pc..any idea or link?
thanks and regards,
lam-ang
Last edited by lam-ang; 13th June 2011 at 16:20.
Hello,
IF you want to know about the SQL support drivers,
use the following debug code,
you can get the list supporting drivers name.Qt Code:
debugLog("Driver supports name "<<db.drivers());To copy to clipboard, switch view to plain text mode
I think PC will support the following the drivers ("QSQLITE", "QPSQL7", "QPSQL") by default
Bookmarks