By StarkMike - 8/25/2006
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.
|
By StarkMike - 8/25/2006
Guys? Anybody?  
Would it just be easier to execute a stored procedure and create a data reader to get my result?
|
By StrataFrame Team - 8/25/2006
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.
|
By StarkMike - 8/25/2006
Thanks.
|