Ric,
>Where I'm struggling is, I don't see how to use, from within my MM.NET business object, the four SqlCommand objects that are defined in my new data access class's IDataAdapter (i.e., SelectCommand, InsertCommand, DeleteCommand, UpdateCommand).
>Please consider this code from my Vendor business object:
>
>
>public DataSet GetVendors()
>{
> VendorDataSet ds = new VendorDataSet();
> mmDataAccessBase dao = this.GetDataAccessObject();
> IDataAdapter da = dao.CreateDataAdapter();
> da.Fill(ds);
> return ds;
>}
>
>
>I get the distinct feeling that I am supposed be using the "this.FillDataSet(ds,...)" method instead of the "da.Fill(ds)" method.
It's actually much easier than that. All you have to do is call GetDataSet() or FillDataSet() on the business object and the call will automatically be passed to your custom data access object. In this particular example you don't need to create a data access object or a data adapter. All you need to do is this:
public DataSet GetVendors()
{
return this.GetDataSet();
}
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com