<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>problems with sql and non-string-typed fields</title><link>https://www.infopathdev.com:443/forums/thread/18483.aspx</link><pubDate>Wed, 09 Aug 2006 10:22:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:18483</guid><dc:creator>Daniel</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/18483.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=18483</wfw:commentRss><description>Hi All!&lt;br /&gt;&lt;br /&gt;I'm new to InfoPath 2007, just started a few days ago.&lt;br /&gt;I have created a form with simple controls on it and I have some code behind written in c# VS2005.&lt;br /&gt;I would like to query a SQL database and populate some of the fields and publish this form to a network drive but I have encountered a few problems:&lt;br /&gt;&lt;br /&gt;1: My Office doesn't seem to have the required permissions to connect to the SQL. I can connect to it in any other way but not from my form code.&lt;br /&gt;&lt;br /&gt;2: I can not set the value of a non-string-typed field.&lt;br /&gt;&lt;br /&gt;I have a NumberOfItems field which has a type of integer.&lt;br /&gt;The code:&lt;br /&gt;&lt;br /&gt;XPathNavigator NumberOfItems = MainDataSource.CreateNavigator().SelectSingleNode("my:myFields/my:NumberOfItems", NamespaceManager);&lt;br /&gt;NumberOfItems.SetValue("123");&lt;br /&gt;&lt;br /&gt;The error message:&lt;br /&gt;Schema validation found non-data type errors.&lt;br /&gt;&lt;br /&gt;3: I publish my form with the Publish Wizard and the summary says that the permission level is domain. But when I want to open the template from the published location it says the form has restricted permission level and it should have domain and suggests to open it from the published location.&lt;br /&gt;&lt;br /&gt;Any idea to these problems?&lt;br /&gt;&lt;br /&gt;Daniel&lt;br /&gt;</description></item></channel></rss>