Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatic update data before saving new record
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01141529
Message ID:
01142021
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform