<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Filtering and Sorting Participants &#8211; Just not Together</title>
	<atom:link href="http://www.re-decoded.com/2008/02/filtering-and-sorting-participants-just-not-together/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.re-decoded.com/2008/02/filtering-and-sorting-participants-just-not-together/</link>
	<description>A technical look at the Raiser&#039;s Edge API from Blackbaud</description>
	<lastBuildDate>Mon, 30 Jan 2012 14:35:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: David Zeidman</title>
		<link>http://www.re-decoded.com/2008/02/filtering-and-sorting-participants-just-not-together/comment-page-1/#comment-73</link>
		<dc:creator>David Zeidman</dc:creator>
		<pubDate>Tue, 05 Feb 2008 20:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.re-decoded.com/2008/02/filtering-and-sorting-participants-just-not-together/#comment-73</guid>
		<description>&lt;p&gt;There are a couple of issues with the solutions above. The first requires that all the items in the sort collection are closed down after they are worked with. What is more I am not convinced they are actually closed down while there is a reference to them in the sort collection. That is why when you shut Raiser&#039;s Edge down it complains that not all the objects have had their closedown methods enacted.&lt;/p&gt;
&lt;p&gt;The second method works fine if you are a supervisor user. However I have experienced issues if you have restricted rights. You will of course need to have rights to participants and I am not refering to that. I have not done enough analysis to work out exactly which rights affect the code but when I use the second method for a non-supervisor user I get the error message:&lt;/p&gt;
&lt;code&gt;&lt;p&gt;General ODBC Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword &#039;AND&#039;.&lt;br /&gt;
Native error:156&lt;br /&gt;
[Microsoft][ODBC SQL Server Driver][SQL Server]The cursor was not declared.&lt;br /&gt;
Native error:16945&lt;/p&gt;&lt;/code&gt;&lt;p&gt;I have however found a work around that is very good.&lt;/p&gt;
&lt;p&gt;Using the IBBSortableDataObjectCursor interface which the cParticipants collection implements I can set my sort field (Participants_fld_DateAdded) and sort direction (descending) so that the code snippet looks like this:&lt;/p&gt;
&lt;code&gt;&lt;p&gt;    Dim oSort As IBBSortableDataObjectCursor&lt;br /&gt;
    oFilter.CustomWhereClause = &quot; RECORDSID = &quot; &amp; oconstit.Fields(RECORDS_fld_ID)&lt;/p&gt;
&lt;p&gt;    Set oSort = oParts&lt;br /&gt;
    oSort.SortField = Participants_fld_DateAdded&lt;br /&gt;
    oSort.SortOrder = Descending&lt;br /&gt;
    bFound = False&lt;/p&gt;
&lt;p&gt;    For Each oPart In oParts&lt;br /&gt;
etc&lt;/p&gt;&lt;/code&gt;
</description>
		<content:encoded><![CDATA[<p>There are a couple of issues with the solutions above. The first requires that all the items in the sort collection are closed down after they are worked with. What is more I am not convinced they are actually closed down while there is a reference to them in the sort collection. That is why when you shut Raiser&#8217;s Edge down it complains that not all the objects have had their closedown methods enacted.</p>
<p>The second method works fine if you are a supervisor user. However I have experienced issues if you have restricted rights. You will of course need to have rights to participants and I am not refering to that. I have not done enough analysis to work out exactly which rights affect the code but when I use the second method for a non-supervisor user I get the error message:</p>
<p><code>
<p>General ODBC Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'AND'.<br />
Native error:156<br />
[Microsoft][ODBC SQL Server Driver][SQL Server]The cursor was not declared.<br />
Native error:16945</p>
<p></code>
<p>I have however found a work around that is very good.</p>
<p>Using the IBBSortableDataObjectCursor interface which the cParticipants collection implements I can set my sort field (Participants_fld_DateAdded) and sort direction (descending) so that the code snippet looks like this:</p>
<p><code>
<p>    Dim oSort As IBBSortableDataObjectCursor<br />
    oFilter.CustomWhereClause = " RECORDSID = " &amp; oconstit.Fields(RECORDS_fld_ID)</p>
<p>    Set oSort = oParts<br />
    oSort.SortField = Participants_fld_DateAdded<br />
    oSort.SortOrder = Descending<br />
    bFound = False</p>
<p>    For Each oPart In oParts<br />
etc</p>
<p></code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

