Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FoxPro date becomes datetime
Message
From
23/04/2002 12:27:56
 
 
To
23/04/2002 11:04:31
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00648169
Message ID:
00648258
Views:
13
Well the following solution seems a little crazy in that it appears to be the only way I have found and a lot of work. But it is what I found.

where:
ClientDataSet = DataSet
born is a (DOB) field in esclient
testBox4 is the component I'm attempting to control.

Binding b = new Binding("Text",ClientDataSet,"esclient.born");
b.Format += new ConvertEventHandler(DateTimeToDate);
textBox4.DataBindings.Add(b);

Apparently, the DataAdapter converts the date to a datetime field automatically (I don't know how to change that - but I bet there is some way). Then when you bind the dataset field to the component (ie textbox) you must write a function to convert it. This does appear to work. However, I would have expected more from a new (and better?) language.
John
John Fabiani
Woodland, CA
Previous
Reply
Map
View

Click here to load this message in the networking platform