When sending a null parameter value to the server, the user must specify System.DBNull, not null. A null value in the system is an empty object that has no value. System.DBNull is used to represent null values.
If the application specifies the database type, the bound value is converted to that type when the provider sends the data to the server. The provider attempts to convert any type of value if it supports the IConvertible interface. Conversion errors may result if the specified type is not compatible with the value.
Both the DbType and OracleDbType properties can be inferred by setting Value. If applicable, the size, precision and scale will also be inferred from Value.
The Value property is overwritten by the System.Data.Common.DbDataAdapter.Update() method.
public void CreateOracleParameter() { OracleParameter myParameter = new OracleParameter("DName", OracleDbType.VarChar, 15); myParameter.Value = "PRODUCTION"; }
Public Sub CreateOracleParameter() Dim myParameter As New OracleParameter("DName", OracleDbType.VarChar, 15) myParameter.Value = "PRODUCTION" End Sub 'CreatePgSqlParameter
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2