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:
01135198
Views:
14
Linda,

>I thought I had it figured out but I'm still getting the same error. I think at least part of the problem was that when I ran the Business Layer Generator, it called the GetNonNullableDbValue function for each of the fields. I changed that to GetNullableDbValue for all the fields that can be blank, including all the date fields. If I leave a date field blank, I still get the MM error message:
>"String was not recognized as a valid DateTime."
>
>I also tried unsuccessfully adding the following code to the click method of my save button right before calling the save method:
>
>
>        if (mmType.IsEmpty(this.txtBirthDate.Text))
>            dsPersonnel.Tables[0].Rows[0]["birthdate"]= DBNull.Value;
>
I'll contact you via direct e-mail on this one so we can get you up and running ASAP.

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
Reply
Map
View

Click here to load this message in the networking platform