<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: inkpicture base64 save to sql server image</title><link>https://www.infopathdev.com:443/forums/thread/53800.aspx</link><pubDate>Sat, 17 Apr 2010 10:53:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53800</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53800.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53800</wfw:commentRss><description>&lt;p&gt;Convert.FromBase64String only works when you have base64 string data. So, if you want to test it, you can always convert an image to base64 (add a picture control to a form, attach an image, open the XML with notepad, copy the base64 in the image field and paste it into a db field, for example, then report on it).&lt;/p&gt;
&lt;p&gt;Like I said, we don&amp;#39;t use database bound forms generally (but it sounds like your form isn&amp;#39;t db bound? just that&amp;nbsp;you are using VS to create the schema?)&amp;nbsp;-- we use our web services to submit to SQL, which allows me to design forms with a field for an image file, then using our mapping tools, save the field value to an nvarchar(max) column. If you are going the custom code route, you could write some code the submitted your image fields as strings to your DB, just as they are in the form. As you mention, you could also try modifying the schema to base64Binary instead -- just create a template from scratch and look at the schema file after you&amp;#39;ve added a picture control for the syntax.&lt;/p&gt;</description></item><item><title>Re: inkpicture base64 save to sql server image</title><link>https://www.infopathdev.com:443/forums/thread/53794.aspx</link><pubDate>Fri, 16 Apr 2010 20:12:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53794</guid><dc:creator>cyberdog</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53794.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53794</wfw:commentRss><description>&lt;p&gt;I have a new issue. I changed the data types in the sql database to varchar(max) from image data type. I use a schema from Visual Studio that maps the sql fields and create an xsd file. I use this file as the basis for the InfoPath form. When I changed the main data source in InfoPath, I get an error on the ink picture controls that says the control cannot store this data type. That is because it is now a simple type when it was before a base64binary. How did you get your sql mapping to work with varchar(max)?&lt;/p&gt;
&lt;p&gt;I see two options for now: I have to manually edit the xsd file that was created to change them back to base64binary or to somehow get the image or varbinary(max) fields in sql to work. I tried System.Convert.FromBase64String(Fields!FieldName.Value) in SSRS based on an image field but that does not work.&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: inkpicture base64 save to sql server image</title><link>https://www.infopathdev.com:443/forums/thread/53782.aspx</link><pubDate>Fri, 16 Apr 2010 16:15:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53782</guid><dc:creator>cyberdog</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53782.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53782</wfw:commentRss><description>&lt;p&gt;OK. thanks. I was just looking into the SSRS side to see if they handle base64 data. This makes it much easier for me not to worry about it in infopath. Also, we were storing the data image data type. Maybe it is better to use nvarchar(max) instead to store the inkpictures. Thanks again.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: inkpicture base64 save to sql server image</title><link>https://www.infopathdev.com:443/forums/thread/53778.aspx</link><pubDate>Fri, 16 Apr 2010 15:52:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53778</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53778.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53778</wfw:commentRss><description>&lt;p&gt;We use our web service for submitting to SQL (&lt;a href="http://www.qdabra.com/en/products/DBXL.aspx"&gt;DBXL&lt;/a&gt;) and I simply map the field in the form that has the base64 data to an nvarchar(max) column in my SQL table. SSRS handles base64 just fine -- you simply need to use an expression for the image source like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;=System.Convert.FromBase64String(Fields!FieldName.Value)&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;With, of course, the field your base64 data is in.&lt;/p&gt;
&lt;p&gt;So, if you are writing custom code to submit to SQL (though I encourage you to try our web services instead, as they are simpler and reusable) you can just save the content of the base64 field to your db and then use it in your report, easy-peasy.&lt;/p&gt;</description></item><item><title>inkpicture base64 save to sql server image</title><link>https://www.infopathdev.com:443/forums/thread/53775.aspx</link><pubDate>Fri, 16 Apr 2010 15:38:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:53775</guid><dc:creator>cyberdog</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/53775.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=53775</wfw:commentRss><description>&lt;p&gt;I have a problem that is bothering me. I have embedded inkpicture controls on a form that is encoded to base64 in the xml. I am going to use a web service to submit the form to a sql server 2005 database. I need to save the base64 data to an image data type in sql server as an image so that a SSRS report can view the images. How do I do that? It seems that I will need to write code to decode the base64 data back to an image data and then save the record. I am using VB. &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>