<?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 : Error when using SubQuery and OrderBy</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Error when using SubQuery and OrderBy</description>
  <pubDate>Mon, 13 Apr 2026 06:46:25 -700</pubDate>
  <lastBuildDate>Mon, 10 Dec 2007 08:56:40 -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=599</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>Error when using SubQuery and OrderBy : Thisappears to bea .NET problem,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=599&amp;PID=2152#2152</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 599<br /><strong>Posted:</strong> 10-Dec-2007 at 8:56am<br /><br />This&nbsp;appears to be&nbsp;a .NET problem, not a DevForce problem.&nbsp; If you search the web, you can find a few links to articles which discuss this problem. <DIV>&nbsp;</DIV><DIV>Try:</DIV><DIV>&nbsp;</DIV><DIV><a href="http://www.in&#102;ormit.com/articles/article.aspx?p=25352&amp;seqNum=4&amp;rl=1" target="_blank">http://www.informit.com/articles/article.aspx?p=25352&amp;seqNum=4&amp;rl=1</A></DIV><DIV>&nbsp;</DIV><DIV><a href="http://odetocode.com/Articles/203.aspx" target="_blank">http://odetocode.com/Articles/203.aspx</A></DIV><DIV>&nbsp;</DIV><DIV><a href="http://forums.asp.net/p/191214/419345.aspx#419345" target="_blank">http://forums.asp.net/p/191214/419345.aspx#419345</A></DIV><DIV>&nbsp;</DIV><DIV>Perhaps, one of your Entities needs to override IComparable (as shown in the example below):</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;public override int CompareTo(Object pObject) {<BR>&nbsp;&nbsp;&nbsp;Employee emp = pObject as Employee;<BR>&nbsp;&nbsp;&nbsp;if (emp == null) return 1;<BR>&nbsp;&nbsp;&nbsp;return this.LastName.CompareTo(emp.LastName);<BR>&nbsp;&nbsp;}<BR></DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 10 Dec 2007 08:56:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=599&amp;PID=2152#2152</guid>
  </item> 
  <item>
   <title>Error when using SubQuery and OrderBy : I&amp;#039;m receiving a &amp;#034;Failed...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=599&amp;PID=2150#2150</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=199" rel="nofollow">johneevo</a><br /><strong>Subject:</strong> 599<br /><strong>Posted:</strong> 10-Dec-2007 at 6:49am<br /><br />I'm receiving a "Failed to compare two elements in the array." error when using a query that has a subquery and order by clauses.  I am ordering by 5 columns but the one that is causing the problem is an int32 column that contains NULLs.  <br /><br />If I suppress query inversion I do not get an error but the data is not sorted correctly.  <br /><br />If I leave query inversion on and do not sort by the problem column, then I do not get an error and the data is sorted correctly.<br /><br />The inner exception that I get with the above mentioned query is:<br /> "At least one object must implement IComparable."<br /><br />Let me know if you need more info on this error.<br />]]>
   </description>
   <pubDate>Mon, 10 Dec 2007 06:49:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=599&amp;PID=2150#2150</guid>
  </item> 
 </channel>
</rss>