Announcement

Collapse
No announcement yet.

SQL Error ... Syntax error in INSERT INTO ...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SQL Error ... Syntax error in INSERT INTO ...

    Installed mcsTemp last night to trial. No 1-wire devices to install yet, so I set it up to log existing devices. The logging worked correctly overnight until I added another device to monitor; my RCS Thermostat current temp, which is device "[1". That's when logging of virtual devices stopped and the errors began:

    8/30/2007 11:51:22 AM mcsTemperature Debug EvaluateDeviceAction DeviceActionCollection.Count=0, MonitoredEventCount=0
    8/30/2007 11:52:22 AM mcsTemperature Debug setIO _60 from 0 to 19, brightness=0
    8/30/2007 11:52:22 AM mcsTemperature Debug setDevice _60 from 3 to 3
    8/30/2007 11:52:22 AM mcsTemperature Debug Log Temperature Sensor Count=3, INSERT INTO Temperature(SampleDate,AtticTemp,Baro,DS Stat) SELECT #2007-08-30 11:52:22 AM# AS QT,9600 AS Q0,2984 AS Q1,7900 AS Q2
    8/30/2007 11:52:22 AM <font color="#FF0000">mcsTemperature Debug Log Temperature SQL Error Syntax error in INSERT INTO statement. on line 840 Syntax error in INSERT INTO statement. </font>
    8/30/2007 11:52:22 AM <font color="#FF0000">mcsTemperature Debug Change Field because , error number=0, Fields=AtticTemp,4,Baro,4,DS Stat,4 </font>
    8/30/2007 11:52:22 AM <font color="#FF0000">mcsTemperature Debug Log Temperature Retry SQL Error Syntax error in INSERT INTO statement. on line 900 Syntax error in INSERT INTO statement. </font>
    8/30/2007 11:52:22 AM mcsTemperature Debug EvaluateDeviceAction DeviceActionCollection.Count=0, MonitoredEventCount=0

    Any ideas what I did wrong?
    Last edited by mfisher; August 30, 2007, 02:09 PM.
    Best regards,
    -Mark-

    If you're not out on the edge, you're taking up too much room!
    Interested in 3D maps? Check out my company site: Solid Terrain Modeling

    #2
    I tried removing the device "[1" and the errors have ceased.
    So, how do I log the data for device "[1"?
    Best regards,
    -Mark-

    If you're not out on the edge, you're taking up too much room!
    Interested in 3D maps? Check out my company site: Solid Terrain Modeling

    Comment


      #3
      Did you use a valid database field name for [1? Try removing the space in the name
      Last edited by Michael McSharry; August 30, 2007, 05:21 PM.

      Comment


        #4
        Issue resolved

        Thanks Michael, it was the space in the DB field name. Does the same go for special characters in DB field names?
        Best regards,
        -Mark-

        If you're not out on the edge, you're taking up too much room!
        Interested in 3D maps? Check out my company site: Solid Terrain Modeling

        Comment


          #5
          Pretty much so. In restrospect I should have made the field names autogenerated rather than having the user enter them

          Comment


            #6
            Thanks for the clarification! Might be something to add to the manual at some point...
            Best regards,
            -Mark-

            If you're not out on the edge, you're taking up too much room!
            Interested in 3D maps? Check out my company site: Solid Terrain Modeling

            Comment

            Working...
            X