Hi there folks!

I've got a little big problem which is already giving me a huge headache...

I am trying to establish a connection to a file database created using sqlite3, but for some reason I can't!

I've first tried to use the following code:

Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
  2. db.setHostName("localhost");
  3. db.setDatabaseName("medadmin");
  4. db.setUserName("****");
  5. db.setPassword("*****");
To copy to clipboard, switch view to plain text mode 

and it didn't work. After some research I found out that Sqlite3 doesn't use permissions on its databases and so I removed the last two lines of the above code (needless to say it didn't work).

What am I doing wrong??? should I set the host name to the full path of the file???

Thanks in advance,