I created a view that is a three table join so that I can use this view to populate my BO using the BrowseDialog. The problem is that this may result in multiple records in the BO that gets populated. I do not want the "real" BO being handled in my form to contain these mutliple records. So how can I use CopyDataFrom to ensure that I get only the DISTINCT records for my "real" BO?
TIA.
Marcia
Hiya Marcia
It works like Select Distinct ColumnName(s) fromTableName.
You will need to add the columns just as you would with a regular select distinct statement
So something like
Me.RealBizObject.CopyDataFrom(Me.BrowseBizobject.CurrentDataTable.DefaultView.ToTable(True, New String() {"Cus_pk","cus_Name","Cus_anotherfld"}), MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromCompleteTable)
=
Select Distinct cus_pk,cus_name,Cus_anotherfld from sometable.
Perfect - thanks for the explanation Now I know why my code was blowing up with a "column active_flg does not belong to table client"
I just wanted to thank you so much for your great advice. Once you explained how this worked, everything worked out great.
Thanks again for staying with a newbie like me
I'm glad I was able to help!!
Paul