Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Value for System.Datetime?
Message
De
10/02/2011 10:27:50
 
 
À
10/02/2011 10:22:35
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
01499619
Message ID:
01499639
Vues:
36
>I found an answer. The VS generates isDatumNull where I can check property DbNull

LOL! You were posting your answer at the same time that I was writing my reply!

~~Bonnie


>
>
>>Hi,
>>I create a dataset and datatable.
>>The datatable has DataColumn "datum" As System.DateTime.
>>
>>For all fields I can create default values.. for integer 0, for boolean false, for string leave property blank, but what should I set for DefaultValue property in System.DateTime case?
>>
>>More..
>>When I leave
<DBNULL>
in this property, later - I can't access this value because it brings an error.. When I use MyTableRow type.. and MyTableRow.datum - not isDbNull - but exception with wrong type cast!
>>
>>So, the question is
>>What the value should I write in the DefaultValue property for System.DateTime?
>>
>>Thanks
>>Denis
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform