Jeff,
>I've had the same problem. When you don't set the default value and the user doesn't enter a value in the control, the dataset contains a null for the value (as expected since nothing was entered). Unfortunately, the MM data checking doesn't seem to handle this possiblity (since the data field is not nullable) and it throws an error.
>
>I've taken the lazy way out and put in default values all over the place. I haven't taken the time to look for a better solution.
>
>I hope this contributes to understanding the problem.
Actually, that's what we've done in the latest release of the MM .NET Business Layer Generator. It's really the only way to handle this situation when the entity property is not nullable. If it's a value type, but not nullable, the Business Layer Generator automatically creates a default value for the column. Maybe I misunderstood this particular post, but I thought she was saying the database column was nullable.
Best 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