I am trying to open a SQL Compact Server file .sdf with Qt. I have the following code:
Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase("QODBC");
  2. db.setDatabaseName("C:\\testresults.sdf");
  3. bool Success = db.open();
  4.  
  5. sprintf(writeToMonitorBuffer, "dblastError = %s", (const char *)db.lastError().text().toLatin1());
  6. writeToMonitor(writeToMonitorBuffer);
  7.  
  8. sprintf(writeToMonitorBuffer, "db.open(): Success/Fail = %s", Success ? "Pass" : "Fail");
  9. writeToMonitor(writeToMonitorBuffer);
To copy to clipboard, switch view to plain text mode 

I am getting the error message:
Qt Code:
  1. dblastError = [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified QODBC3: Unable to connect
To copy to clipboard, switch view to plain text mode 

And I get:
Qt Code:
  1. db.open(): Success/Fail = Fail
To copy to clipboard, switch view to plain text mode 


In the past I have connected to MS Access database by using
Qt Code:
  1. db.setDatabaseName("Driver={Microsoft Access Driver (*.mdb, *.accdb)};DSN='';DBQ=C:\\temp\\TestEng_TestDatabase.accdb");
To copy to clipboard, switch view to plain text mode 

Not sure what I should be putting for
"Driver={???}