c# - problem with null column -


In my database there are some blank values ​​in a column (two types) in my database. I get a sored to get the data in my app. I am performing the process

  wipDBTableAdapters.XLSFacturiTableAdapter TAFacturi = new wipDBTableAdapters.XLSFacturiTableAdapter (); Var dtfacturi = TAFacturi.GetData (CodProiect);  

Then I try to do something like this:

  if (dtfacturi [i] .content == faucet) {// do something} < / Code> 

This is a warning:

  The result of the expression is always 'false' because 'double' type value is never equal to 'null' Is the type 'double?  

But when I run my code, I get the following exception:

  StrongTipping Expression 'XLS Factory' is the value of 'CANTITATE' in the table DBNull .  

How should I solve this?

While working, the need to check the NULL values ​​with data in DB and instead of NAT Use class.


Comments