Hello friends,

I have problem to connect to 2008 express Database.

Qt Code:
  1. static bool createConnection(QString driver= "QODBC",
  2. QString connectionstr="DRIVER={SQL Server};"
  3. "Server=IP\\Instance;Trusted_Connection=no;"
  4. "Database=Databasename;Uid="";Pwd="";"
  5. )
  6. {
  7. QSqlDatabase db = QSqlDatabase::addDatabase(driver);
  8. db.setDatabaseName(connectionstr);
  9. db.setUserName("");
  10. db.setPassword("");
  11. if (!db.open()) {
  12. QSqlError err = db.lastError ();
  13. QMessageBox::information(0, QObject::tr("Cannot open database"), err.text());
  14. return false;
  15. }
  16. return true;
  17.  
  18. }
To copy to clipboard, switch view to plain text mode 

with this code I have no problem to Connect to mssql 2005 but with 2008 it doesn´t connect.

Have anybody an idea????