Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default DateTime values in Typed Dataset
Message
De
06/02/2006 17:50:54
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
À
06/02/2006 13:02:28
Rick Forbes
Brotherhood of Maintenance of Way Employ
Royal Oak, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01094021
Message ID:
01094149
Vues:
8
>Does anyone know the correct syntax to place a default date value (System.DateTime.Today) in a typed dataset's DefaultValue property??

Unfortunately column default attributes only accept a constant. To get around this you can leave the datetime column out of the schema and let the database handle the default value (and remove it from the DataAdapter's SqlCommands), or you can hook into the DataTable.RowChanged event.

There might be some way to do it in a WinForms application if you are using the DataBindingManager. If this is the case, maybe someone else will post the answer.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform