What is the best way of exporting BLOB?

SunsetSunset Member Posts: 196
Kicking and screaming we are now entering BC! Therefor I am facing a big upgradeproject which includes going from TempBlob Record to "Temp Blob" Codeunit. Therefor I am looking for some information on how to best use/transfer the old pieces of code into the new one?

For intance I have a lot of places where various files have been stored. And when we want to see the file we use:
CALCFIELDS("File as BLOB");
if not "File as BLOB".HASVALUE then ERROR(Text003);
                    
BLOBRef.Blob := "File as BLOB";
FileMgt.BLOBExport(BLOBRef, FileName, true);
BLOBRef is the old record which I can easily change to the new codeunit. But what is the best way of getting the blob field into the codeunit?
Doing outstreams, instreams and copystreams seem like unneccesary/ugly lines of codes. So not knowing enough about streams, I am wondering if there might be a better way.
Don't just take my word for it, test it yourself

Answers

  • RockWithNAVRockWithNAV Member Posts: 1,138
    Normally I use Downloadstream If I have to download it manually and save somewhere in the Clients Machine.

    What's your exact requirement?
  • SunsetSunset Member Posts: 196
    Just about anywhere where you can use BLOBS.
    1. Various files (Mostly XML) streamed into BLOBs for archieve.
      This shouldn't be a problem as it still works the same way.
    2. BLOBs being passed around tables for log and posting purposes.
      Should also be ok.
    3. And being exported; both client and serverside.
      And this is where we have been using the TempBlob record which is no longer.
      Don't just take my word for it, test it yourself
    Sign In or Register to comment.