<?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>Data Access and ObjectDataSource Control</title><link>http://forums.asp.net/23.aspx</link><description>Questions and discussions related to using ADO.NET for data access, and the ObjectDataSource control. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=9&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How do I find the number of rows returned in an Object Data Source</title><link>http://forums.asp.net/thread/1748465.aspx</link><pubDate>Mon, 11 Jun 2007 09:02:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1748465</guid><dc:creator>swaino</dc:creator><author>swaino</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1748465.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=1748465</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Ok thanks all!&lt;img src="http://forums.asp.net/emoticons/emotion-2.gif" alt="Big Smile" /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How do I find the number of rows returned in an Object Data Source</title><link>http://forums.asp.net/thread/1739906.aspx</link><pubDate>Tue, 05 Jun 2007 12:32:26 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1739906</guid><dc:creator>Sohnee</dc:creator><author>Sohnee</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1739906.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=1739906</wfw:commentRss><description>&lt;p&gt;Apologies - I omitted a chunk from that... &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bool bGetSelectCount;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (bGetSelectCount)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBox1.Text = e.ReturnValue.ToString();&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bGetSelectCount = e.ExecutingSelectCount;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;</description></item><item><title>Re: How do I find the number of rows returned in an Object Data Source</title><link>http://forums.asp.net/thread/1739584.aspx</link><pubDate>Tue, 05 Jun 2007 08:18:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1739584</guid><dc:creator>kennyp</dc:creator><author>kennyp</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1739584.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=1739584</wfw:commentRss><description>&lt;p&gt;swaino, i get the number of rows like this.&lt;/p&gt;&lt;font size="1"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; ObjectDataSource1_Selected(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; sender &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Object&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.Web.UI.WebControls.ObjectDataSourceStatusEventArgs) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Handles&lt;/font&gt;&lt;font size="2"&gt; ObjectDataSource1.Selected&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;font size="1"&gt;&lt;font size="2"&gt;
&lt;p&gt;NumberOfRows = e.ReturnValue.Rows.Count()&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: How do I find the number of rows returned in an Object Data Source</title><link>http://forums.asp.net/thread/1738444.aspx</link><pubDate>Mon, 04 Jun 2007 15:58:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1738444</guid><dc:creator>swaino</dc:creator><author>swaino</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1738444.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=1738444</wfw:commentRss><description>&lt;p&gt;The e.ExecutingSelectCount returns a boolean.&amp;nbsp; How would I return the number of rows from that?&lt;/p&gt;</description></item><item><title>Re: How do I find the number of rows returned in an Object Data Source</title><link>http://forums.asp.net/thread/1738286.aspx</link><pubDate>Mon, 04 Jun 2007 14:26:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1738286</guid><dc:creator>kennyp</dc:creator><author>kennyp</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1738286.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=1738286</wfw:commentRss><description>&lt;p&gt;Take a look at parameter &amp;#39;e&amp;#39; in&amp;nbsp;the Selected event of the ObjectDataSource. The ReturnValue should give you the datatable/dataset you&amp;#39;re about to bind. You should be able to get the number of rows from that.&lt;/p&gt;</description></item><item><title>Re: How do I find the number of rows returned in an Object Data Source</title><link>http://forums.asp.net/thread/1738275.aspx</link><pubDate>Mon, 04 Jun 2007 14:20:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1738275</guid><dc:creator>Sohnee</dc:creator><author>Sohnee</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1738275.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=1738275</wfw:commentRss><description>&lt;p&gt;I believe you&amp;#39;d use the selecting event handler - like this:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bGetSelectCount = e.ExecutingSelectCount;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;</description></item><item><title>How do I find the number of rows returned in an Object Data Source</title><link>http://forums.asp.net/thread/1738231.aspx</link><pubDate>Mon, 04 Jun 2007 13:51:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1738231</guid><dc:creator>swaino</dc:creator><author>swaino</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1738231.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=23&amp;PostID=1738231</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;Does anyone know how to find out how many rows have been returned when an Object Data Source has been bound?&lt;/p&gt;&lt;p&gt;Thanks.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>