C#: Insert NULL values into SQL Server database(binaryelves.wordpress.com)
submitted by
elfy(230) 3 years, 4 months ago
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.
|category: C#
|Views: 352
tags:
C# another
Everyones tags:
Your Tags: