I'm trying to write back to the database on a failure.
The SQL command coming out of Integration looks like:
SET [Message] = N'%LastErrorMessage%', [Status] = 2
WHERE ([Reference] = N'%_Reference%')
There are two things wrong with this:
- The %LastErrorMessage% contains 'single apostrophes' , generating an error from SQL because the string suddenly stops:
SET [_Message] = N'The 'label.btw' print job did not complete due to the following error:
How can I adjust this?
- The [Reference] field is an Integer, and is also as such recognized in the Database connection. However it's still trying to make it an NVARCHAR apparently. Can that be adjusted?