NetTalk Central

Author Topic: StringTheory FromBlob  (Read 1703 times)

kingja

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
    • Email
StringTheory FromBlob
« on: October 11, 2014, 04:49:47 PM »
I have tried to use ST to get the contents of a Blob into a sting.  I use:

st.FromBlob(XYZ:BlobField)

I have tried many different embeds with no luck.  Specifically, after uploading a PDF to a target Blob, which works as expected,
I want to load it into a string so I can do further processing.  The string object is blank...I try looking at it using message(st.GetValue()).  I have tried in Post Insert embed.  Does the file need to be explicitly opened in order to access the Blob?  I have tried Access:myFileOpen() and Access:myFile.UseFile() but still no luck.

Thanks,

Jeff

JohanR

  • Sr. Member
  • ****
  • Posts: 342
    • View Profile
    • Email
Re: StringTheory FromBlob
« Reply #1 on: October 12, 2014, 12:40:33 AM »
Hi

Below some code that I am using in my situation.


stblob =  stringhteory object
loc:st_filename = full path and filename




 if Access:docmast.fetch(dcm:docmast_isn_key)
     loc:err = true
 else
     if stblob.FromBlob(dcm:docmast_blob) ! 1=success 0=failure
        if stblob.SaveFile(loc:st_filename) ! 1=success 0=failure
        else
            loc:err = true
        end
     else
        loc:err = true
     end
end


Johan