Update database records - escape characters & wrong datatype
I'm trying to write back to the database on a failure.
The SQL command coming out of Integration looks like:
UPDATE [table]
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?
Thank you!
-
Stefan Spraakman
★ BarTender Hero ★
Anyone please?
0 -
pthane
★ BarTender Hero ★
You may want to raise a Support Query for this and see if they can help out directly rather than use this user forum. It is not something I have had done before, sorry.
0 -
Stefan Spraakman
★ BarTender Hero ★
Thanks Peter, just did so.
0
Iniciar sesión para dejar un comentario.
Comentarios
3 comentarios