I also tried other combinations:
Qt Code:
  1. QSqlQuery query;
  2. query.prepare(QLatin1String( "INSERT INTO Clients (ExpUserName, Password, FirstName, LastName,Email, Phone, CreateDate, LastModified, HarpGroup, isActive) VALUES (?,?,?,?,?,?,?,?,?,?)"));
  3. ....
  4. if( !query.exec() )
  5. qDebug() << "> Query exec() error." << query.lastError().type();
  6. else
  7. qDebug() << ">Query exec() success.";
To copy to clipboard, switch view to plain text mode 

The error type is 0.