I want to use QMYSQL.
What are the driver installation files I need to install to work with my Qt4.6.2
and where can i get it?
Which version of QMYSQL I need to use ?
What are the procedures?
I want to use QMYSQL.
What are the driver installation files I need to install to work with my Qt4.6.2
and where can i get it?
Which version of QMYSQL I need to use ?
What are the procedures?
Read this guide.
babygal (27th July 2010)
The debug message reads as:Qt Code:
int main(int argc, char *argv[]) { if (!createConnection()) return 1; Q_INIT_RESOURCE(cardiacprocessingtoolkit); MainWindow mainWin; mainWin.show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
("QSQLITE", "QMYSQL3", "QMYSQL", "QODBC3", "QODBC")
but the connection fails ! what's wrong?
Qt Code:
static bool createConnection() { db.setHostName("localhost"); db.setDatabaseName("DatabaseName"); if (!db.open()) { qApp->tr("Unable to establish a database connection.\n" "This example needs MYSQL support. Please read " "the Qt SQL driver documentation for information how " "to build it.\n\n" return false; } return true; }To copy to clipboard, switch view to plain text mode
Can you connect to your MySQL server using MySQL client (mysql.exe) without username and password? Make sure your database "DatabaseName" exist and MySQL service is running.
Then probably you have to start your server!
babygal (12th August 2010)
No, but you must add sql module in your .pro.
babygal (12th August 2010)
babygal (12th August 2010)
Yayyy..Happy news ...it works ..my program can now connect to the mysql database on another server.
Thanks a million. and thanks for the patience replying my queries. Thanks!!!!
take the MySQL Community Server. It will have all necessary files.
I'm not able to execute the command 'reimp' as per the instruction in the link . And where can I get the download files for the reimp?
Goto the sub-directory lib/opt and run reimp libmysql.lib to produce the liblibmysql.a file. This is the import library to use with MinGW.
Bookmarks