views:

124

answers:

1

Is it possible to store binary information in a Dynamics field? For example, I'd like to store an MS Word document inside the Dynamics database.

+1  A: 

Yes, add a container field to the table, then use the BinData Class to read the file and convert the data to a container. For an examples of this, look at how the standard Document handling feature stores files in the database in the table method DocuValue.writeDocuValue(), or look at how image files are stored in the CompanyImage form.

Jay Hofacker
Beware that container and memo fields in transaction tables are bad practice due to the extra disk read operations involved. Consider using a separate table to store the document and reference keys. `DocuValue` is such a table, no problem here.
Jan B. Kjeldsen

related questions