View Single Post
  #8 (permalink)  
Old 03-12-2008, 08:17 AM
Erel's Avatar
Erel Erel is offline
Administrator
 
Join Date: Apr 2007
Posts: 3,325
Default

When you read a value from a table that value must not be null.
You can use the COALESCE keyword which replaces NULLs with a default value.

Code:
SqlCommand.CommandText="Select COALESCE(cod_asl,0) FROM T_Certificati where ID_certificato=1"
Reply With Quote