Hello,
I am trying to pass variables into the query, this was working without making the column name a variable, but now I am trying to write a general case where it will use the custom value of each page to identify which column it should UPDATE.
queryValue = system.tag.read(’[PanelShop]JobNumSelect’).value
system.db.runPrepUpdate(""“UPDATE PanelShop.dbo.ActiveList SET %s = (?) WHERE JobNum = (?)”"" % str(event.source.Area) , [ 0, str(queryValue)])
##################################################################
This returns no error
I have also tried this:
runPrepUpdate(“UPDATE DATABASE SET (?) = (?) WHERE COLUMN1 = (?)” , [Argument1, arg2, arg3])
##################################################################
The query works if I just do:
(“UPDATE DATABASE SET COLUMN2 = (?) WHERE COLUMN1 = (?)” , [Argument1, arg2])
Help there is no error code