Matt,
Thanks for the reply. Unfortunately, this is a known bug with Infopath. File attachments were not orginally part of Infopath; they came with SP1. There is a special processing instruction needed at the top of the infopath xml to activate file attachments. I believe it is something like
<?mso-infopath-file-attachments-present?>
. When I open my infopath form for editing, I call the method NewSolutionWithData. This method strips out the processing instruction for file attachments. The data is still there, but the user cannot interact with it. See the following document on the MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_ip2003_ta/html/odc_InfoPath_attaching_files.asp quote:
When the NewFromSolutionWithData method is used to create a new form based on a form template, file attachment controls in the form will be disabled until the form is saved and reopened.
I think they will resolve the bug in Office 2007.
Thanks,
Ben Daniel
quote:
Originally posted by Matt Faus
Hi Ben,
This seems like a weird bug. Are you 100% sure that the DB does nothing to alter the XML at all? What is the data type of the column that you are storing it in? For InfoPath to display the file in the file attachment control it has to have a specific header with some special information in it and if this stuff gets mangled in any way it won't display even if the base64 string is there.
If possible, could you paste the base64 string that is giving you trouble so we could try it out?