Changeset 18439 for trunk


Ignore:
Timestamp:
02/17/16 08:32:35 (9 years ago)
Author:
tbretz
Message:
The user must be embraces by parenthesis in the INSERT statement.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/makeschedule.cc

    r18438 r18439  
    465465    str << "INSERT INTO Schedule (fStart, fUser, fMeasurementID, fMeasurementTypeKEY, fSourceKEY) VALUES\n";
    466466
    467     str << "('" << Time(obs[0].begin-startup_offset).GetAsStr() << "', auto, 0, " << types["Startup"] << ", NULL),\n"; // [Startup]\n";
     467    str << "('" << Time(obs[0].begin-startup_offset).GetAsStr() << "', 'auto', 0, " << types["Startup"] << ", NULL),\n"; // [Startup]\n";
    468468    for (const auto& src: obs)
    469469    {
     
    481481
    482482        if (src.name!="SLEEP")
    483             str << "('" << tm << "', auto, 0, " << types["Data"] << ", " << src.key << "),\n"; // [Data: " << src.name << "]\n";
     483            str << "('" << tm << "', 'auto', 0, " << types["Data"] << ", " << src.key << "),\n"; // [Data: " << src.name << "]\n";
    484484        else
    485             str << "('" << tm << "', auto, 0, " << types["Sleep"] << ", NULL),\n"; // [Sleep]\n";
    486     }
    487 
    488     str << "('" << Time(obs.back().end).GetAsStr() << "', auto, 0, " << types["Shutdown"] << ", NULL)";// [Shutdown]";
     485            str << "('" << tm << "', 'auto', 0, " << types["Sleep"] << ", NULL),\n"; // [Sleep]\n";
     486    }
     487
     488    str << "('" << Time(obs.back().end).GetAsStr() << "', 'auto', 0, " << types["Shutdown"] << ", NULL)";// [Shutdown]";
    489489
    490490    if (enter<0)
Note: See TracChangeset for help on using the changeset viewer.