Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling date fields from Visual FoxPro
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01129644
Message ID:
01170576
Views:
8
Ted,

>When an SQL server column is nullable how do I set/update the entity column value to null?

In the upcoming MM .ENT 2.3 We have changed nullable entity properties so this works properly. Here's an example of the new code:
this.Row["OrderDate"] = mmType.SetNullableDbValue(value);
mmType.SetNullableDbValue is a new method that looks like this:
public static object SetNullableDbValue(object value)
{
	return (value == null) ? DBNull.Value : value;
}
For now, you can just change the Set() of the entity property to use similar logic as the SetNullableDbValue() method, or you can send me a private e-mail and I will get you a pre-release of the new version.

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