DataSet
-
A table contains a,b,c columns a contains data. b and c Contains NULL Values. I fill dataset(ds) with the values of a,b,c if(ds.Tables[0].Rows[0]["b"].ToString()==Null ) textbox1.text="asd"; this condition is not satisfied,when comparing with value NULL ,they failed to compare and skip that condition. What other syntax I can use to solve that problem.
-
A table contains a,b,c columns a contains data. b and c Contains NULL Values. I fill dataset(ds) with the values of a,b,c if(ds.Tables[0].Rows[0]["b"].ToString()==Null ) textbox1.text="asd"; this condition is not satisfied,when comparing with value NULL ,they failed to compare and skip that condition. What other syntax I can use to solve that problem.
if(ds.Tables[0].Rows[0]["b"] == System.DBNull.Value)
-
if(ds.Tables[0].Rows[0]["b"] == System.DBNull.Value)