AnsweredAssumed Answered

Execute sql based on analysis result

Question asked by matthewskl Champion on Jun 21, 2017
Latest reply on Jun 29, 2017 by Roger Palmen

We have AF set up and have been monitoring some critical items in our MES and sending notifications based on database values.  One of these values indicates whether or not at data archiving process is running or not This comes into Pi via a table lookup from SQL Server and runs through an analysis.  Right now, if Pi sees the value as 'Y' a notification is sent to the support team.  They connect into SQL server and set the value back to 'N' to get things running again.


The support team has worked with our other vendor and found that there's currently a bug in the system which is causing this issue to happen frequently.  The current suggested work around is to follow the process that they've been doing, manually resetting the flag.


The support team has since come to me and asked if I could just have Pi reset the value for them in SQL Server until a bug fix is released.


I know that I could do this with ACE although I've never used it before and we don't currently have it installed.  Is there an alternative way to handle this? 


tl,dr;  Based on an analysis result, how can I execute an update statement or a stored procedure on a SQL server from Pi?