BO.Count vs BO.CurrentDataTable.Rows.Count


Author
Message
choyt
choyt
StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)
Group: Forum Members
Posts: 78, Visits: 246
Thanks much...this is what I was concerned about.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I just checked the source code and Bo.Count = Bo.CurrentDataTable.DefaultView.Count = Bo.CurrentView.Count



So, it could bite you, if you apply filters to the BO.
choyt
choyt
StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)StrataFrame Novice (98 reputation)
Group: Forum Members
Posts: 78, Visits: 246
When I create a test project, these 2 properties always return the same value. Is this something to be relied upon or is there an underlying differenece?

I always ahve used the ..Rows.Count version but one of our Jr. guys has been using BO.Count and I'd hate to be bitten by this sometime in the future. Below is a sample of what I am referring to.

Thanks!

Dim a As New FSS.BO.Lookup.ActivityType

a.Fill()

Dim i As Int32 = a.Count (== 5)

Dim i2 As Int32 = a.CurrentDataTable.Rows.Count (==5)


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search