Ignore:
Timestamp:
09/06/11 21:14:52 (11 years ago)
Author:
Stefan Strahl <stef@…>
Branches:
master, qt5
Children:
1006c4f
Parents:
4bf728f
Message:

Fixed ticket #20

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    r4bf728f r3655d06  
    5959        QString allSqlStatements = file.readAll();
    6060        foreach(QString sql, allSqlStatements.split(";")) {
     61            if (sql.trimmed().length() == 0)     // do not execute empty queries like the last character from create_tables.sql
     62                continue;
    6163            QSqlQuery query(database);
    62             if (!query.exec(sql)) qDebug() << "Could not execute query" << query.lastError();
     64            if (!query.exec(sql)) qDebug() << "Could not execute query '" << sql << "' error:" << query.lastError();
    6365        }
    6466    }
Note: See TracChangeset for help on using the changeset viewer.