Error!
Success!

C#: Insert NULL values into SQL Server database

0
kicks

C#: Insert NULL values into SQL Server database  (Unpublished)

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.


Kicked By:
Drop Kicked By: