Nick,
>I noticed that MM does not respect default values from the back end. Here is a sample: I run the sample application, created new order, created new line item, entered values for product, price and quantity and I left discount blank. When I tried to save I got error message saying that discount can not be null, but on the back end (SQL Server Northwind) that column has a default value of 0. How can I avoid that behaviour and make MM to respect default values from SQL server.
If you want to use default values you can use typed DataSets to achieve this. To use a typed DataSet with an MM .NET business object, you need to:
1. Create the Typed DataSet
2. Override the business object's CreateDataSet() method, returning an instance of your typed DataSet. For example, in C#:
protected override mmDataSet CreateDataSet()
{
return new EmployeeDataSet();
}
And in VB .NET:
Protected Overrides Function CreateDataSet() As Main.Data.mmDataSet
Return New EmployeeDataSet
End Function
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