How to programmatically insert a row/record into a table (generated by third party software) where one of the fields is named when
and user
which are coincidentally sql keywords.
The sql command is:
INSERT INTO APPT
(ApptID,Type,Descrip,When,Flag,User,DTS)
VALUES
(41,0,'Test Note','20/10/2014 1:42:00 PM',16,'AP','22/10/2014 8:24:01 AM')
Which gives the errors:
Error 156: Incorrect syntax near the keyword 'When'.
Error 156: Incorrect syntax near the keyword 'User'.