5 Replies Latest reply on Oct 16, 2017 11:09 PM by Adi Bannady

    SQL Query Error

    brent.reid

      Hello,

       

      I am trying to get data from my SQL Server into my PI Server, but I am getting an error in my SQL query. Below is the error I am receiving. I have verified that I am connected to my from my PI server to my SQL Server from my ODBC connection.

       

      SQL Query: /SQL="SELECT Timestamp, Value, 0 FROM dbo.ResponsibleStatus WHERE DeviceID = 1 AND Name = 'gas1' ;"

       

      Error Message:

      Tue Nov 17 06:18:19 2015 [DEB-1]: Input point - KLU.Ventilation.AQS1.CO : added to sc 1.

      Tue Nov 17 06:18:19 2015 [DEB-1]: Point - KLU.Ventilation.AQS1.CO : SQL statement(s) : SELECT Timestamp, Value, 0 FROM dbo.ResponsibleStatus WHERE DeviceID = 1 AND Name = 'gas1' ;

      Tue Nov 17 06:18:19 2015 [IFC-E]: SQLExecute> Point - KLU.Ventilation.AQS1.CO : doTrialExec() : [S][42S02]: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'DBO.RESPONSIBLESTATUS'.

      Tue Nov 17 06:18:20 2015 [IFC-E]: SQLExecute> Point - KLU.Ventilation.AQS1.CO : doTrialExec() : [S][42000]: [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared.

      Tue Nov 17 06:18:20 2015 [IFC-E]: uni_dsil> Point - KLU.Ventilation.AQS1.CO : tag refused.

        • Re: SQL Query Error
          cvillanua

          Hello Brent,

           

          I have seen a very similar issue to yours in the database. Could you please let me know the bitness of the Operating System, where you are running the PI ODBC interface?

           

          If it is a 64 bits, have you configured the DSN (Data Source Name) using the 32 bit ODBC connections ( C:\Windows\SysWOW64>odbcad32.exe )?