Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro date becomes datetime
Message
De
23/04/2002 12:27:56
 
 
À
23/04/2002 11:04:31
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
00648169
Message ID:
00648258
Vues:
14
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform