0
kicks
C#: Insert NULL values into SQL Server database
To insert into database NULL value from C# code we can’t use just simple declaration for empty string like string textToInsert = “”; This will insert into database just empty string instead NULL value.
To handle this case you have to use special SQL type: System.Data.SqlTypes.SqlString.Null
See example.