| 643 | } |
| 644 | |
| 645 | bool SQLiteDriver::commitTransaction() |
| 646 | { |
| 647 | if (!isOpen() || isOpenError()) |
| 648 | return false; |
| 649 | |
| 650 | QSqlQuery q(createResult()); |
| 651 | if (!q.exec(QLatin1String("COMMIT"))) { |
| 652 | setLastError(QSqlError(tr("Unable to commit transaction"), |
| 653 | q.lastError().databaseText(), QSqlError::TransactionError)); |
| 654 | return false; |
| 655 | } |
| 656 | |
| 657 | return true; |
| 658 | } |
| 659 | |
| 660 | bool SQLiteDriver::rollbackTransaction() |
| 661 | { |