No ratings

Incorrect syntax near the keyword 'WHERE' error




Symptoms


When executing an Update method and passing in the EmptyString inline function into a smartobject field to update the value of that field to null/empty, it returns with an error message: Incorrect syntax near the keyword 'WHERE'

Diagnoses


This is an expected behavior. An Empty string is essentially a blank value, which means the string has no value. So, K2 ignores any blank fields as this indicates that it should not be changed. If you specify a value, then it should be changed.



Resolution

Use SCNULL in a data field instead to clear/blank a value. If you don?t want to use SCNULL, you may also build a stored procedure to update the field to an empty string and call this stored procedure.





Version history
Last update:
‎03-29-2017 02:30 AM
Updated by:
Contributors