2
I am saving an image in SQL Server using the varbinary field(max).
However, when I run the query to return to the front, I can only return by converting the field to sweep.
My question is how to read the returned string, and if this is the best way to do it.
The string saved in my database as varbinary is "0x646174613A696D6167652F6A7065673B6261736536342C2F396A2F346749" and what returns to the front when I convert to varchar is "data:image/jpeg;Base64,/9j/4gI", for example.
Thanks in advance!
I noticed that the problem itself is when I try to return the value using ADVPL, I include the field in select, but when I try to return it using: variable := qry->fieldbase64, it says that it cannot locate the alias "fieldbase64", and if I remove this line the code runs normally.
I changed the way saved to varchar(max), now the image string is stored as follows: "data:image/jpeg;Base64,/9j/4gIcSUNDX1BST0ZJ...", when I try to return giving a select in the column to the front returns a message "invalid field name...", if I remove the select value and blank return goes without problem.
– Luis Henrique Abeno