Avatar of grogo21

asked on 

Check for DB Null Value

Hello I am using the following code to check for a null value:

     If dr8.Item(0) Is DBNull.Value Then NormalSizeDisplays = 0 Else NormalSizeDisplays = dr8.Item(0)

But i am gettting error:

Object reference not set to an instance of an object.

What is the correct way to check for a null value in sql 2005
ASP.NETMicrosoft SQL Server 2005Visual Basic.NET

Avatar of undefined
Last Comment
Jorge Paulino

8/22/2022 - Mon