views:

88

answers:

4

in mysql default null value is (NULL)

when i try to use it in c# that code not work because it is a string who have a value "(NULL)"

how i can check that string is null or not. if i check by string.insnullorempty or ==null it's not worked

how can i check this row is null or not in c#

+1  A: 

String.IsNullOrEmpty() - should help IMO...

Sunny
the string have a value "(NULL)". so it is not worked
4thpage
A: 

Ok, so have you tried string.IsNullOrEmpty() or using a comparison like myValue == NULL?

Wim Haanstra
+2  A: 

Is it possible that you have some configuration problem (e.g. wrong SQL in 'create table' statement) for which mySql is returning you a string containing "(NULL)" instead of a null value?

Paolo Tedesco
+2  A: 

if (dbval == System.DBNull.Value)

Run CMD
thanks but issue is solved now i can check using string.isnullorempty()
4thpage