Hi all I have been trying for hours now to get a MySQL database to work in my project. Only problem is I am unable to create the database. I don't get any errors anything, nothing seems to happen. Everything compiles fine but no databases are created. Qt tells me that I have all the database drivers i need...

I have: ("QSQLITE", "QMYSQL3", "QMYSQL", "QODBC3", "QODBC")

The code that I'm using to try and create my database is:

Qt Code:
  1. db.addDatabase("QMYSQL");
  2. db.setDatabaseName("test");
  3. if(!db.open()){
  4. message.information(this, "Error", "Database not opened");
  5. }
To copy to clipboard, switch view to plain text mode 

What am I doing wrong? This is all beginning to annoy me now!!

Thanks for your time and trouble. Any help would be much appreciated