Top "Dbnull" questions

DBNull is a special value in The .Net framework indicating that the value is NULL in the database.

avoid checking for DataRow.IsDBNull on each column?

My code is 2x longer than it would be if I could automatically set IsDBNull to "" or simply roll over …

vb.net dataset datarow dbnull
How to deal with SqlDataReader null values in VB.net

I have the follwoing code that performs a query and returns a result. However, I looked around and found some …

asp.net vb.net sqldatareader dbnull
How do I set a field to DBNull in Entity Framework

How do you set a field to DBNull in Entity Framework? The fields are strongly typed so you cannot set …

entity-framework dbnull
Simple way to convert dbNull to a string in VB.NET

I'm looking for a simpler way to check if a value is dbNull and to convert it to an empty …

vb.net dbnull
Null value in a parameter varbinary datatype

How can I add a null value in a parameter varbinary datatype? When I execute the following code: using (SqlConnection …

c# winforms sql-server-2008 parameters dbnull
Which of IsDBNull and IsNull should be used?

If in VB.NET I have DataRow and I want to test whether a column value is Null, should I …

.net vb.net null dbnull
ASP.Net check value with DBNULL

I have the following code foreach (DataRowView dr in Data) { if (dr == System.DBNull.Value) { nedID = 1; } } but i get the …

asp.net dbnull
How to check for NULL in MySqlDataReader by the column's name?

How can I check for a NULL value in an open MySqlDataReader? The following doesn't work; it's always hitting the …

c# mysql null dbnull mysqldatareader
Checking for DBNull throws a StrongTypingException

I am using a dataset to pull data from a DB. One of the fields in a row is NULL. …

.net vb.net dbnull
Dealing with DBNull.Value

I frequently have to deal with DataTables connected to grid controls, custom updating always seems to produce a lot of …

c# .net dbnull