Hi,

I'm porting a pure C++ application in Qt.
These application create a SQLITE database structure in one instruction
Qt Code:
  1. const char* sql =
  2. "create table T1 (id INTEGER, name TEXT); \n"
  3. "create table T2 (id INTEGER, name TEXT); \n";
  4.  
  5. int ans = sqlite_exec (db, sql, 0, 0, 0);
  6. if (SQLITE_OK != ans) {
  7. ...
  8. }
To copy to clipboard, switch view to plain text mode 

writing this code
Qt Code:
  1. const char* sql =
  2. "create table T1 (id INTEGER, name TEXT); \n"
  3. "create table T2 (id INTEGER, name TEXT); \n";
  4.  
  5. QSqlQuery q(db)
  6. if (!q.exec(sql)) {
  7. ...
  8. }
To copy to clipboard, switch view to plain text mode 

QSqlQuery::exec returns true but only the first table is created.
I think this is a QSqlDriver limit.

Any suggestion?

PS. At the moment i resolved creating an array of query and executing them one a time