<?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>Re: Query by storeprocedure</title><link>https://www.infopathdev.com:443/forums/thread/29911.aspx</link><pubDate>Mon, 30 Jun 2008 07:05:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29911</guid><dc:creator>Dromont</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29911.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29911</wfw:commentRss><description>&lt;p&gt;I find the error: in my complete code &amp;quot;var custid&amp;quot; was emptied before the query and so the query doesnt work! Sorry!&lt;/p&gt;</description></item><item><title>Query by storeprocedure</title><link>https://www.infopathdev.com:443/forums/thread/29910.aspx</link><pubDate>Mon, 30 Jun 2008 06:52:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29910</guid><dc:creator>Dromont</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29910.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29910</wfw:commentRss><description>&lt;p&gt;Hi, I have a big question for you. This is&amp;nbsp;my code to query a store procedure on Sql Server 2005&amp;nbsp;&lt;/p&gt;
&lt;p&gt;var custid = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/my:NewCase/my:LastCustID&amp;quot;).text;&lt;br /&gt;var plantid = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/my:NewCase/my:LastPlantID&amp;quot;).text;&lt;br /&gt;var machineid = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/my:NewCase/my:LastMachineID&amp;quot;).text;&lt;br /&gt;var richi = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/my:NewCase/my:Richiedente&amp;quot;).text;&lt;br /&gt;var telrichi = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/my:NewCase/my:TelRichiedente&amp;quot;).text;&lt;br /&gt;var contratto = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/my:NewCase/my:contratto&amp;quot;).text;&lt;br /&gt;var scadenza = XDocument.DOM.selectSingleNode(&amp;quot;/dfs:myFields/my:NewCase/my:ScadenzaContratto&amp;quot;).text;&lt;br /&gt;XDocument.QueryAdapter.Command = &amp;#39;execute &amp;quot;dbo&amp;quot;.&amp;quot;aggiorna_contattiD &amp;quot;&amp;#39; + custid + &amp;quot;, &amp;quot; + plantid + &amp;quot;, &amp;quot;+ machineid + &amp;quot;, &amp;#39;&amp;quot;+ richi + &amp;quot;&amp;#39;, &amp;#39;&amp;quot;+ telrichi + &amp;quot;&amp;#39;, &amp;#39;&amp;quot;+ contratto + &amp;quot;&amp;#39;, &amp;#39;&amp;quot;+ scadenza + &amp;quot;&amp;#39;&amp;quot;;&lt;br /&gt;XDocument.Query();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;the &lt;strong&gt;FIRST&lt;/strong&gt; time that I submit the form there&amp;#39;s not problem. But when I open the form the second time and I try againt to submit I have this error: &amp;quot;&lt;u&gt;Error Convenrting Datatype nvarchar to int&lt;/u&gt;&amp;quot;. Why? The second submit it is not the same like the first? Thank you&lt;/p&gt;</description></item></channel></rss>