Which of IsDBNull and IsNull should be used?

后端 未结 7 1972
傲寒
傲寒 2021-01-07 23:02

If in VB.NET I have DataRow and I want to test whether a column value is Null, should I use:

myDataRow.IsNull(\"Column         


        
7条回答
  •  再見小時候
    2021-01-07 23:36

    From a database design and usage point of view, IsNull is the correct and accepted way to interrogate the value of a column, based on use of various database technologies including SQL, DB2, OLAP, MOLAP, RDBMS, MDBMS, SPSS, Essbase, etc. By definition Null is the absence of a value, a unknown, and Null is not even equal to Null, so any adjunct to Null is just a matter of convenience.

提交回复
热议问题