Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting null value on Integer
Message
De
26/01/2016 16:35:22
 
 
À
26/01/2016 16:32:55
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01630133
Message ID:
01630264
Vues:
37
>When dealing with DataRows its much easier to use the Field (https://msdn.microsoft.com/en-us/library/bb360891%28v=vs.110%29.aspx) and SetField (https://msdn.microsoft.com/en-us/library/bb353039%28v=vs.110%29.aspx) extension methods instead of accessing the fields directly. You can use these methods to get or set the field to a string, nullable int, nullable datetime, etc. without needing to deal with DBNull at all. Sample VB code for retrieving a nullable datetime can be found at http://stackoverflow.com/questions/4158568/populating-a-nullable-type-from-a-datarow.

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform