Export (0) Print
Expand All

SqlNullValueException Class

The exception that is thrown when the Value property of a SqlTypes structure is set to null.

For a list of all members of this type, see SqlNullValueException Members.

System.Object
   System.Exception
      System.SystemException
         System.Data.SqlTypes.SqlTypeException
            System.Data.SqlTypes.SqlNullValueException

[Visual Basic]
<Serializable>
NotInheritable Public Class SqlNullValueException
   Inherits SqlTypeException
[C#]
[Serializable]
public sealed class SqlNullValueException : SqlTypeException
[C++]
[Serializable]
public __gc __sealed class SqlNullValueException : public
   SqlTypeException
[JScript]
public
   Serializable
class SqlNullValueException extends SqlTypeException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Remarks

In order to avoid throwing this exception, you should always check the IsNull property of the structure before accessing the Value property.

Requirements

Namespace: System.Data.SqlTypes

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: System.Data (in System.Data.dll)

See Also

SqlNullValueException Members | System.Data.SqlTypes Namespace

Show:
© 2015 Microsoft