Skip to content
Advertisement

Error parsing query: [ Token line number = 1,Token line offset = 27,Token in error = BY ]

I’m trying to pass a SQL command to delete data which has a property BY ( unique nvarchar), but I get this parsing error every time.

Error parsing query: [ Token line number = 1,Token line offset = 27,Token in error = BY ]

I have also tried to do the same command to a different property called Category (which is also nvarchar but NOT unique and not key) and the command passes and the line containing the entered string does get removed. I am thinking if it could be because I have the BY set to Unique, No NULL, KEY.. or maybe something else. Here is my simple code for the button to execute the command.

Advertisement

Answer

I think BY is a reserved word. Try escaping it with brackets.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement