﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Performing a GROUP BY on a DataTable/BO...</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 09:52:11 GMT</lastBuildDate><ttl>20</ttl><item><title>Performing a GROUP BY on a DataTable/BO...</title><link>http://forum.strataframe.net/FindPost2471.aspx</link><description>I have a BO that is filled with data that could contain more than one division. How can I perform an aggregate function on this BO/DataTable to determine if I have more than one type of division?  For example&lt;br&gt;
&lt;br&gt;
ID     Division&lt;br&gt;
1       A&lt;br&gt;
2       A&lt;br&gt;
3       B&lt;br&gt;
&lt;br&gt;
I was wondering if there was a way to do this without making a trip to the database... whether it be a .NET way or a StrataFrame way.&lt;br&gt;
&lt;br&gt;
Thanks.&lt;br&gt;</description><pubDate>Fri, 25 Aug 2006 14:09:31 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Performing a GROUP BY on a DataTable/BO...</title><link>http://forum.strataframe.net/FindPost2482.aspx</link><description>Thanks.</description><pubDate>Fri, 25 Aug 2006 14:09:31 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Performing a GROUP BY on a DataTable/BO...</title><link>http://forum.strataframe.net/FindPost2481.aspx</link><description>You can do a DataTable.Select on the CurrentDataTable of the business object and select the rows that contain each of the 3 divisions.&amp;nbsp; The method will return a DataRow array that contains the count of the records that match the given select, but that requires that you test each division type and then check the length of the returned array.&amp;nbsp; DataTables cannot do any sort of complex or aggregate functions, so if it's too complex, you'll have to do it through the database.</description><pubDate>Fri, 25 Aug 2006 14:03:19 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Performing a GROUP BY on a DataTable/BO...</title><link>http://forum.strataframe.net/FindPost2479.aspx</link><description>Guys? Anybody? :cool:;)&lt;br&gt;
&lt;br&gt;
Would it just be easier to execute a stored procedure and create a data reader to get my result?</description><pubDate>Fri, 25 Aug 2006 13:38:26 GMT</pubDate><dc:creator>StarkMike</dc:creator></item></channel></rss>