<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : distinct queries</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : distinct queries</description>
  <pubDate>Mon, 13 Apr 2026 20:15:57 -700</pubDate>
  <lastBuildDate>Tue, 03 Feb 2009 10:55:39 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1079</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>distinct queries : I am using a PassThroughQuery...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1079&amp;PID=3856#3856</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=202" rel="nofollow">BillG</a><br /><strong>Subject:</strong> 1079<br /><strong>Posted:</strong> 03-Feb-2009 at 10:55am<br /><br />I am using a PassThroughQuery to show only distinct rows from a certain table.&nbsp; I have no choice this table has duplicates and I don't want to show the duplicates in a drop down combo box.<DIV>&nbsp;</DIV><DIV>I do the following, </DIV><DIV>&nbsp;</DIV><DIV>public LocalBanch&#091;&#093; GetLocals()</DIV><DIV>{</DIV><DIV>&nbsp;&nbsp;&nbsp; PassThruRdbQuery query = new PassThruRdbQuery(typeof(LocalBranch), "Select distinct &#091;Local&#093; from LocalBranch&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; order&nbsp;by &#091;Local&#093;");</DIV><DIV>&nbsp;&nbsp;&nbsp; LocalBranch&#091;&#093; locals = (LocalBranch&#091;&#093;) myPM.GetEntities(query);</DIV><DIV>&nbsp;&nbsp; return locals</DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>in my form I have a&nbsp;bindingsource as follows </DIV><DIV>&nbsp;</DIV><DIV>LocalBS.DataSource = myController.GetLocals();</DIV><DIV>&nbsp;</DIV><DIV>In my Control Binding Manager, I want to set the LocalComboBox to LocalBranch, which is the relationship between the member table and the LocalBranch table.&nbsp; I set the ListConverter to LocalBS and Local as the field to display. Incidentally Local is the only field being returned.</DIV><DIV>&nbsp;</DIV><DIV>I get the combo box displaying the distinct values but I also get the red exclamation point and the following is the error message when the user selects from the combo box.</DIV><DIV>&nbsp;</DIV><DIV>Object reference not set to the instance of an object.</DIV><DIV>&nbsp;</DIV><DIV>Any suggestions or is there a better way of doing this?</DIV><DIV>&nbsp;</DIV><DIV>Bill</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 03 Feb 2009 10:55:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1079&amp;PID=3856#3856</guid>
  </item> 
 </channel>
</rss>