effectprocess 추가
git-svn-id: svn://192.168.0.12/source@306 8346c931-da38-4b9b-9d4c-e48b93cbd075
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
#include <QSettings>
|
||||
#include <QSqlError>
|
||||
#include <QSqlQuery>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QDebug>
|
||||
namespace
|
||||
{
|
||||
const QString SEPERATOR = "!@#";
|
||||
@@ -45,19 +48,19 @@ bool SResultSender::send(const State_s1_effect& _result)
|
||||
|
||||
if (!db.open())
|
||||
{
|
||||
emit error(E_ERROR_CODE::DB_OPEN_ERROR, db.lastError().text());
|
||||
emit signalError(E_ERROR_CODE::DB_OPEN_ERROR, db.lastError().text());
|
||||
return false;
|
||||
}
|
||||
|
||||
DBContainer container(db);
|
||||
|
||||
QString strQuery = "delete from stats_s1_effect where eventcode = " + QString::number(_result.event_num);
|
||||
QString strQuery = "delete from stats_s1_effect where event_num = " + QString::number(_result.event_num);
|
||||
|
||||
QSqlQuery query(db);
|
||||
|
||||
if (!query.exec(strQuery))
|
||||
{
|
||||
emit error(E_ERROR_CODE::DB_QUERY_ERROR, query.lastError().text() + SEPERATOR + query.lastQuery());
|
||||
emit signalError(E_ERROR_CODE::DB_QUERY_ERROR, query.lastError().text() + "\n" + query.lastQuery());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -78,7 +81,9 @@ bool SResultSender::send(const State_s1_effect& _result)
|
||||
|
||||
if (!query.exec())
|
||||
{
|
||||
emit error(E_ERROR_CODE::DB_QUERY_ERROR, query.lastError().text() + SEPERATOR + query.lastQuery());
|
||||
qDebug() << "insert error";
|
||||
|
||||
emit signalError(E_ERROR_CODE::DB_QUERY_ERROR, query.lastError().text() + "\n" + query.lastQuery());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user