Setting a database property to null

If you attempt to set a database property to null using the .NET Framework, you will probably fail. This is because the .NET Framework uses the DBNull class instead of null for database values.

Solution

Use DBNull instead of null. For more information, see the .NET Framework documentation.

Copyright © 2005 Microsoft Corporation.
All rights reserved.