[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 693
  • Last Modified:

Null Value for Boolean data type

I have a Bool Data type that I would like to update with a null value to the DB.
I get an error saying null is not of Boolean type.
Im using LINQ to talk to the DB.
What im using

Table.Column = Convert.ToBoolean(DBNull.Value.ToString());
0
u2envy1
Asked:
u2envy1
1 Solution
 
BTosonCommented:
Try the following:
Table.Column = null;
0
 
u2envy1Author Commented:
Yip, perfect. It works.......
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now