I have a table with a DateTime column
the column can have NULL values
Now I connect to the database using an ODBC connection and get the value into a DataTable in .net / c#.
I am able to check it for NULL by going
if(String.IsNullOrEmpty(table.rows[0][0].ToString())
{
//Whatever I want to do
}
Is String.IsNullOrEmpty the correct way to check for null values.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…