Microsoft KB Archive/938417

= BUG: Error message when you try to push the DBNull.Value value to the source database in a .NET Framework 3.0-based application: &quot;System.ArgumentException Cannot set Column ' ' to be null Please use DBNull instead&quot; =

Article ID: 938417

Article Last Modified on 8/3/2007

-

APPLIES TO


 * Microsoft .NET Framework 3.0

-



SYMPTOMS
Consider the following scenario. In a Microsoft .NET Framework 3.0-based application, you use Microsoft ADO.NET to bind to data. Then, you try to push the DBNull.Value value to the source database. In this scenario, you may receive an error message that resembles the following:

System.ArgumentException: Cannot set Column ' ' to be null. Please use DBNull instead.



CAUSE
This problem occurs because the DBNull.Value value cannot be converted to the same type as the type of the source property.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Keywords: kbinfo kbtshoot kbexpertiseinter kbexpertisebeginner kbbug KB938417

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.