>I don't really see a good reason to cast DBNull to Nothing though ... what does that give you? You still need to test for Nothing, don't you? DBNull and Nothing mean different things, one is a NULL value in a database column, the other means basically that an object hasn't been instantiated ... so, I'm just curious about how you're utilizing this. Maybe I'm missing something useful. <g>
>
When I assign a field value from a DataReader to a property, I get a casting error if I've forgotten to use my nvl() function. I use DataReaders much more than I use DataSets, so I encounter this all the time.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement