CLOB to BLOB (RESOLVED)
Posted: Wed Mar 11, 2020 8:11 am
I have images stored as CLOB data in a database file. Currently to display this CLOB data on the web I have a routine that disassembles the string and reassembles it using 65k chunks. I then set the image on the screen:
Everything works like a charm.
Now - I would like to start converting this CLOB data into a BLOB datatype field. BLOBs are so much easier to use with third party reporting software (and just in general).
I looked through the forum and found a nifty utility #SYS_WEB.CreateBlob. My thinking was as I am breaking this CLOB data out and reassembling it into a base64 string I could save the Base64 string as a Blob using this new utility. It doesn't work and was hoping someone could help me find out why.
Code:
Failure is on that line of code.
Error: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
I know the base64 string is valid because the images are created on the screen (if I leave this new code out). I'm not sure what " 'atob' on 'Window' " is.
I'm thankful for your help.
-Chad-
Sherrill Furniture Company
Code: Select all
#ExitPhoto.CurrentItem.Image <= #SYS_APPLN.CreateBitmap( #Base64 )Now - I would like to start converting this CLOB data into a BLOB datatype field. BLOBs are so much easier to use with third party reporting software (and just in general).
I looked through the forum and found a nifty utility #SYS_WEB.CreateBlob. My thinking was as I am breaking this CLOB data out and reassembling it into a base64 string I could save the Base64 string as a Blob using this new utility. It doesn't work and was hoping someone could help me find out why.
Code:
Code: Select all
#W_BLOB := #SYS_WEB.CreateBlob( #Base64 "image/png" )
Error: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
I know the base64 string is valid because the images are created on the screen (if I leave this new code out). I'm not sure what " 'atob' on 'Window' " is.
I'm thankful for your help.
-Chad-
Sherrill Furniture Company