Hi Everybody,

I run a program that connects to a database like this:

Qt Code:
  1. QSqlDatabase dB = QSqlDatabase::addDatabase("QODBC");
  2. dB.setHostName("localhost");
  3. dB.setDatabaseName("DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DSN='';DBQ=C:/Program Files (x86)/myFolder/myAccesApp.mdb;");
To copy to clipboard, switch view to plain text mode 

This obviously refers to an *mdb-file on localhost. Now: I'd like to connect directly to the database and not go through the mdb-file. Here's a snippet off the regEdit:

Qt Code:
  1. [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\SomeName]
  2. "Driver"="%systemroot%\\System32\\SQLSRV32.DLL"
  3. "Description"="SomeDescription"
  4. "Server"="MYHOSTNAME"
  5. "LastUser"="me"
  6. "Trusted_Connection"="Yes"
  7. "Database"="NameOfDatabase"
To copy to clipboard, switch view to plain text mode 


How (if) would I form a sufficient string for the setDatabaseName() - methode?
Or am I completely wrong and without *mdb there is no way?

My basic problem is, that if I run more than one instance of the program (all looking at the same database of course), the database goes nuts and writes completely irrelevant crap into the tables using the sql - "update" - command.
Perhaps there is another major blindspot on my side?

Every help highly appreciated.

Regards, Lars