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开发者_StackOverflow社区 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#
if (dbval == System.DBNull.Value)
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?
String.IsNullOrEmpty() - should help IMO...
Ok, so have you tried string.IsNullOrEmpty() or using a comparison like myValue == NULL?
精彩评论