AnsweredAssumed Answered

Send pdf to SQL Server Database column

Question asked by mallikarjun.ratala563207 on Jan 8, 2018
Latest reply on Jan 10, 2018 by mallikarjun.ratala563207

Hi Experts,

 

We are trying to insert a pdf file to SQL Server Database as varbinary(max) data type, as part of a migration project from Biztalk to Boomi. As I understand Boomi, doesn’t support this datatype, I followed this approach

 

  1. Read the pdf file and store it as Dynamic Process Property
  2. Read the xml file and store it as Dynamic Process Property, xml contains metadata of the pdf file.
  3. Call the Wrapper Store Proc passing the DPP’s.
  4. Wrapper stored proc does the following
    1. Receive xml and pdf content
    2. Converts the Char )[pdf Contents), received as Varchar from Boomi to VarBinary(max) data type
    3. Calls the Main Stored Proc to insert into tables
    4. Data is successfully inserted in the tables, with the varbinary data looking like 0x2550WNSUDN…453.
  5. Another application (currently in Prod), reads the binary data from the Table and displays as a pdf for download.

 

Issue:

Steps 1-4 execute successfully, However, step 5, is failing as the pdf is failing to be opened.

 

Shortened process is attached for reference:

 

 

Tried attempts:

  1. Tried encoding the content in step1 and passing the same in step 3.
  2. Tried un-encoding the content in step1 and passing the same in step 3.

 

 The above steps works fine with Biztalk (currently in Prod), As Biztalk and SQL Server are both MS products, Biztalk has got an implicit convertor to convert the file to varbinary(Max) and call the stored Proc. In Boomi's case as we are converting a file --> char -->varchar --> varbinary(max).

 

Any pointers would be appreciated on how this can be handled.

Outcomes