>For example, I have a business object called 'Order', which bind to order table. The
>order table has a field called 'orderDate'. When the user adds new order, my
>application will automatically set the orderDate to today's date. Then save the record
>into database using business object. I tried to update the orderDate value in business
>object entity. The code as below:
>
>
>order.Entity.orderDate = Now.Date
>
>
>But it causes runtime error. Below is the error message shown in web page.
>
>
>Object reference not set to an instance of an object.
I'm guessing that order.Entity doesn't have a DataRow at the point you are trying to set the date. Can you post the entire method where you are trying to set the date?
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