<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/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>SQL Server, SQL Server Express, and SqlDataSource Control</title><link>http://forums.asp.net/54.aspx</link><description>All about SQL Server, SQL Server Express, MSDE, and the SqlDataSource control.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Nested Stored Proecedure</title><link>http://forums.asp.net/thread/2589888.aspx</link><pubDate>Fri, 29 Aug 2008 21:22:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2589888</guid><dc:creator>bedubs</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2589888.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=2589888</wfw:commentRss><description>I found out the answer I need to add &lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;
&lt;p&gt;MultipleActiveResultSets=True&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Nested Stored Proecedure</title><link>http://forums.asp.net/thread/2589335.aspx</link><pubDate>Fri, 29 Aug 2008 16:00:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2589335</guid><dc:creator>bedubs</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2589335.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=2589335</wfw:commentRss><description>&lt;p&gt;YES Thank you jameswright for the quick response. That is exactly what i need. I think i might have something wrong on my syntax because when i execute my script i receive an error : There is already an open DataReader associated with this Command which must be closed first.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Nested Stored Proecedure</title><link>http://forums.asp.net/thread/2589280.aspx</link><pubDate>Fri, 29 Aug 2008 15:36:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2589280</guid><dc:creator>jameswright</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2589280.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=2589280</wfw:commentRss><description>&lt;p&gt;Actually, you&amp;#39;re still connected to the database inside your while loop. So, you would just need to construct the new command you need and and use cmd.ExecuteNonQuery().&lt;br /&gt;&lt;br /&gt;while(reader.Read())&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; string val = //Get val from API.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp; SqlCommand update = new SqlCommand(&amp;quot;UPDATE MyTable ... &amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; update.ExecuteNonQuery();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;..close up connection. That on the right track?&lt;/p&gt;</description></item><item><title>Nested Stored Proecedure</title><link>http://forums.asp.net/thread/2589254.aspx</link><pubDate>Fri, 29 Aug 2008 15:27:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2589254</guid><dc:creator>bedubs</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2589254.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=54&amp;PostID=2589254</wfw:commentRss><description>&lt;p&gt;I have a pretty basic connection to a database, My question is nested in the While Statement&lt;br /&gt;C#.NET&lt;br /&gt;MSSQL 2005&lt;br /&gt;Data.SqlClient&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;        String strCon = &lt;span class="st"&gt;&amp;quot;Server=...&amp;quot;&lt;/span&gt;;
        SqlConnection conn = &lt;span class="kwd"&gt;new&lt;/span&gt; SqlConnection(strCon);
        SqlDataReader rdr = &lt;span class="kwd"&gt;null&lt;/span&gt;;

        conn.Open();

        SqlCommand cmd = &lt;span class="kwd"&gt;new&lt;/span&gt; SqlCommand(&lt;span class="st"&gt;&amp;quot;select intID, email from cventcontacts WHERE URL is null&amp;quot;&lt;/span&gt;,conn);

        rdr = cmd.ExecuteReader();

        &lt;span class="kwd"&gt;while&lt;/span&gt; (rdr.Read())
        {
           	// I want to get information from a 3rd party API based on email from rdr[1] then UPDATE the record in my database&lt;br /&gt;	// I think i can figure out the api side of it, but how do i reconnect to the database and update the record?&lt;br /&gt;        }
        rdr.Close();
        conn.Close();
        emails.Text = sb.ToString();&lt;/pre&gt;&amp;nbsp;Thanks in advance</description></item></channel></rss>