Skip to main content


 

Symptoms

 


I noticed that my attachment control is saving data in the below format. Can you help me understand where exactly the data of the file is being stored? I have the SQL field setup as a nvarchar(max) and as a Memo data type in the smart object.

filename.extensionn1sbbwlz.boefilename.extension
 

 

Diagnoses

 


The FilePath property in the XML refers to a temporary location of Window's Isolated Storage. The current Files location is a temporary cache (it’s cleared every few minutes) and it is used to stream files temporarily while interacting with the Smartforms attachment control.

 

 

Resolution
To store the file in the database, you need to call a "Create/Update" Smartobject method and pass the control into the Smartobject call.

The following datatype flow below is applicable:

Nvarchar(max) datatype (SQL backend) <--> File/Image type (Smartobject Property) <--> Calling a Create/Update method and passing the Attachment Control into this Smartobject's File/Image type property

When passing the attachment control into the Create/Update method, the Smartobject will access the temporary file (in the isolated storage location via the control's XML properties), then convert that file into a Base64 encoded string and write this string to the database.



 
Be the first to reply!

Reply