| | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 07/09/2008 2:20:16 PM Posts: 436, Visits: 944 |
| 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
ID Division
1 A
2 A
3 B
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.
Thanks. |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 07/09/2008 2:20:16 PM Posts: 436, Visits: 944 |
| Guys? Anybody?  
Would it just be easier to execute a stored procedure and create a data reader to get my result? |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 12/02/2008 4:42:46 PM Posts: 2,686, Visits: 1,890 |
| You can do a DataTable.Select on the CurrentDataTable of the business object and select the rows that contain each of the 3 divisions. 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. 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.
www.bungie.net |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: 07/09/2008 2:20:16 PM Posts: 436, Visits: 944 |
| | |
|
|