<?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: Programatically set a database attribute</title><link>https://www.infopathdev.com:443/forums/thread/86467.aspx</link><pubDate>Sat, 26 Jan 2013 00:22:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86467</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/86467.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=86467</wfw:commentRss><description>Hi - what&amp;#39;s the error you are getting?</description></item><item><title>Programatically set a database attribute</title><link>https://www.infopathdev.com:443/forums/thread/86196.aspx</link><pubDate>Fri, 18 Jan 2013 16:47:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:86196</guid><dc:creator>DarrylGould</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/86196.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=86196</wfw:commentRss><description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;I am trying to programatically set a SQL database attribute, and I keep getting errors.&lt;/p&gt;
&lt;p&gt;I am trying to use this code to set the @ComIPSCode value to &amp;#39;CaseCode&amp;#39;.&amp;nbsp; I am able to set other fields in the form to the CaseCode value, but for some reason I am unable to set the @ComIPSCode using this. Can anyone see any problems?&amp;nbsp; Do I need a diferent method for setting a database attribute?&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Try&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Me.Errors.DeleteAll() webservConn.Execute(Nothing, OutputNav, ErrorNav) &lt;br /&gt;Dim CaseCode As String&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;If CheckReturnStatus(OutputDoc) = False Then&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;CaseCode = GetCaseCode(OutputDoc)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Dim xNav As XPathNavigator = Me.CreateNavigator() Dim ns As XmlNamespaceManager = Me.NamespaceManager &lt;br /&gt;xNav.SelectSingleNode(&amp;quot;//dfs:myFields/dfs:dataFields/d:TrustDeeds/@ComIPSCode&amp;quot;, ns).SetValue(CaseCode)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End If&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;Catch ex As Exception &lt;br /&gt;System.Windows.Forms.MessageBox.Show(ex.InnerException.ToString)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;End Try&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;</description></item></channel></rss>