Changed UNIQUE statements in the database table definition so that they make sense...
[toast/confclerk.git] / src / sql / sqlengine.cpp
index 71a1c90a7a15fb3cac6e4f168cb307c48b9359c1..db3635534c24fa4c0f3ff289f2124917fd6d1873 100644 (file)
@@ -116,7 +116,7 @@ void SqlEngine::addConferenceToDB(QHash<QString,QString> &aConference)
             query.bindValue(":day_change", -QTime::fromString(aConference["day_change"],TIME_FORMAT).secsTo(QTime(0,0)));
             query.bindValue(":day_change", -QTime::fromString(aConference["timeslot_duration"],TIME_FORMAT).secsTo(QTime(0,0)));
             query.bindValue(":active", confsList.count() > 0 ? 0 : 1);
-            query.exec();
+            if (!query.exec()) qDebug() << "Could not execute query to insert a conference:" << query.lastError();
             aConference["id"] = query.lastInsertId().toString(); // 'id' is assigned automatically
         }
     }