Posted 11 Sep 2015 Facing some problem while developing SCADA. Kinldy give some solution for below problems. 1) While using Update statement I want to use tag instead of values e.g $DBUpdate("sajja","MFG1_EMPTY_DETAILS", $Date ,"MFG1_EMPTY_DATE") $DBUpdate("sajja","MFG1_EMPTY_DETAILS", $Time ,"MFG1_EMPTY_TIME") Its showing “Script is OK “ but it is not showing the current date and time in DB.It copying same $Date and $Time in DB 2) using Delete statement I want to use tag instead of values e.g Query 1: $DBDelete( "sajja", "Recipe", "REC_Product_Code = $RECIPE_SEL[1]", "" ) Query 2: Dim A A= "Delete from Recipe where REC_Product_Code = $RECIPE_SEL[1] " $DBExecute("sajja",A) Its showing “Script is OK “ but not working. If I use product code directly instead of $RECIPE_SEL[1] then it I working Ok. Share this post Link to post Share on other sites
Posted 3 Nov 2015 Hi, Hopefully you've already been able to solve these issues, but I'll leave my comments anyway. 1) I'm not sure what the issue is with this item. I don't see any obvious issues although it wasn't quite clear to me from your discription what is actually happening. As it is written, it should update the date/time columns for every row in the table (because the DBUpdate optStrCondition isn't being used) - not sure if that was your intention or not. Also, I found the InduSoft provided DB functions to be too limiting and actually re-implemented them in VBScript myself. It takes a bit of doing, but if you're familiar with SQL and VBScript it is worth doing in the long run. 2) You just need a minor adjustment in syntax. The tag needs to be concatenated with the string and not included inside it. So change it from: A= "Delete from Recipe where REC_Product_Code = $RECIPE_SEL[1] " to A= "Delete from Recipe where REC_Product_Code = " & $RECIPE_SEL[1] Share this post Link to post Share on other sites