Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exception when saving
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01065248
Message ID:
01066307
Views:
22
This message has been marked as the solution to the initial question of the thread.
Doug,

I've got something for you to try.

  1. In your business object project, create a subclass of mmDataAccessSql (use the MM .NET SQL Server Data Access item template to make this easier) and add the following code to the CreateDataAdapter() method:
    /// <summary>
    /// Factory method that instantiates the data adapter
    /// </summary>
    /// <returns>Data Adapter</returns>
    public override System.Data.IDataAdapter CreateDataAdapter()
    {
        this.CommandBuilder = null;
        return base.CreateDataAdapter();
    }
  2. In your application's Factory class, override the CreateDataAccessSql() factory method to return your new data access class. For example:
    public class Factory : OakLeaf.MM.Main.Windows.Forms.mmFactoryDesktop
    {
            public override OakLeaf.MM.Main.Data.mmDataAccessSql CreateDataAccessSql()
            {
                return new MyDataAccessSql();
            }
    }

Let me know if this fixes the problem.

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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform