Skip to main content


 

Symptoms


File attachment with Oracle database
 

Diagnoses


Is there currently a K2 out-of-box method for K2 SmartForms storing .pdf attachments into Oracle Tables? We are utilizing the Oracle Service Broker.
 

Resolution

When using SQL service broker/Smartbox Smartobject, the Smartforms file attachment control will base64 encode the specified file and store this encoded string in a nvarchar(max) SQL column.

One possible out-of-the-box method when using Oracle service broker is to create a Oracle column of type 'CLOB'. The Oracle service broker will expose a 'CLOB' oracle data-type as a service object 'memo' type, similar to how the SQL service broker will expose the SQL 'nvarchar(max)' as a 'memo' type (the Oracle 'varchar2' and 'nvarchar2' type is limited to a 4000 characters limit, and as such limits the file attachment size).

Creategenerate a Smartobject from the Oracle service object, then map the 'CLOB''memo' column type to the Smartobject 'File' property type. Generate a item view and test file uploadattachment to Oracle. This was tested successfully with a ~13mb file. This may not be the best/only implementation but is one possible method with out-of-the-box functionalities.




 
Be the first to reply!

Reply