<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Programmatically Assigning Picture Field Information</title><link>https://www.infopathdev.com:443/forums/thread/48871.aspx</link><pubDate>Tue, 10 Nov 2009 17:44:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48871</guid><dc:creator>bafadam</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48871.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=48871</wfw:commentRss><description>Awesome.  

I no longer get the error, but the 64 encoding isn&amp;#39;t working for me.  I mean, it generates the 64 bit string, and I can look at it, but it&amp;#39; not the same as the string that&amp;#39;s sitting in the field when I navigate to the picture and then put it there.

Also, when the process finishes, the picture doesn&amp;#39;t appear in the field at all.

Any thoughts on THAT one?  :)</description></item><item><title>Re: Programmatically Assigning Picture Field Information</title><link>https://www.infopathdev.com:443/forums/thread/48832.aspx</link><pubDate>Mon, 09 Nov 2009 21:05:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48832</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48832.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=48832</wfw:commentRss><description>&lt;p&gt;Hi --&lt;/p&gt;
&lt;p&gt;You&amp;#39;ll have to remove the xsi:nil attribute from &amp;#39;personPicField&amp;#39; when you set its value. &lt;a href="http://blogs.msdn.com/infopath/archive/2006/11/28/the-xsi-nil-attribute.aspx"&gt;Here&amp;#39;s&lt;/a&gt; a great blog post from the InfoPath Team with code samples.&lt;/p&gt;</description></item><item><title>Programmatically Assigning Picture Field Information</title><link>https://www.infopathdev.com:443/forums/thread/48831.aspx</link><pubDate>Mon, 09 Nov 2009 20:45:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48831</guid><dc:creator>bafadam</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48831.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=48831</wfw:commentRss><description>&lt;p&gt;So, to start out with, I&amp;#39;m using this code right here &lt;a href="http://support.microsoft.com/kb/892730"&gt;http://support.microsoft.com/kb/892730&lt;/a&gt;&amp;nbsp;from the Knowledge Base article.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I open up a new InfoPathAttachmentEncoder, navigate to my image (it all works) and then try and assign the Base64Encoding value to the field that is the picture field in the data source.&lt;/p&gt;
&lt;p&gt;Every time I do, I get a &amp;quot;schema validation found non-data type errors&amp;quot; error thrown by Visual Studio.&amp;nbsp; I&amp;#39;ve looked at the encoded date, and it seems to be doing the translation just fine...&amp;nbsp; I&amp;#39;m only using the VSTA, if that matters, and here&amp;#39;s my exact code:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; InfoPathAttachmentEncoder ie = new InfoPathAttachmentEncoder(&amp;quot;c:\\atb\\2_bigger.png&amp;quot;);&lt;br /&gt;&amp;nbsp; DOM.SelectSingleNode(&amp;quot;/my:myFields/my:PersonsInformation/my:personPicField&amp;quot;, NamespaceManager).SetValue(ie.ToBase64String());&lt;/p&gt;
&lt;p&gt;Thoughts?&lt;/p&gt;</description></item></channel></rss>