Subversion Repositories public iLand

Rev

Rev 214 | Rev 274 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 214 Rev 270
Line 44... Line 44...
44
44
45
    QSqlQuery query(GlobalSettings::instance()->dbin());
45
    QSqlQuery query(GlobalSettings::instance()->dbin());
46
    mSetupQuery = &query;
46
    mSetupQuery = &query;
47
    QString sql = QString("select * from %1").arg(tableName);
47
    QString sql = QString("select * from %1").arg(tableName);
48
    query.exec(sql);
48
    query.exec(sql);
-
 
49
    if (query.lastError().isValid()){
-
 
50
        throw IException(QString("Error loading species set: %1 \n %2").arg(sql, query.lastError().text()) );
-
 
51
    }
-
 
52
49
    clear();
53
    clear();
50
    qDebug() << "attempting to load a species set from" << tableName;
54
    qDebug() << "attempting to load a species set from" << tableName;
51
    while (query.next()) {
55
    while (query.next()) {
52
        if (var("active").toInt()==0)
56
        if (var("active").toInt()==0)
53
            continue;
57
            continue;