-2
In the SQL query I was using the CRC16 field without any treatment, this field had a blank space at the end, causing the problem, because the code was breaking.
I made the following change in the field, to remove the spaces, so the problem was solved and Qrcode was successfully generated.
RTRIM(LTRIM(CONVERT(VARCHAR(MAX),CRC16))) AS URL1