I am running into a strange issue when trying to transfer a picture from a container to an external SQL Database. The FMP file (V16) is on a server. The server has the ODBC drivers and other connections with the SQL Database work.
I have used the Base64 encode function to reference the picture and populate a text field. I then reference the text field in the Execute SQL statement and run this server side.
The issue is this does not work when referencing the field. The statement is
"select api_img_create( 1, '"&Cards::base64&"');"
What is strange is if I take the text from the field and insert it directly into the statement it works
"select api_img_create( 1, '/9j/4QBYRXhpZgAASUkqAAgAAAABAJiCAgAzAAAAGgAAAAAAAABDb3B5cmlnaHQgUGhpbGlwcCBBbW1vbiAyMDE');"
(this is truncated to show what the statement looks like.)
I am beginning to wonder if this is a bug. The fact that the statement works when the text is inserted into the statement tells me that the script and odbc setup must be OK, the only thing that really changes is referencing the data. I have tried putting the base64 string into a variable and referencing that does not work either.
Has anybody else encountered this issue? This is definitely one for FMP Geeks!