title: OracleParameter and DBNull.Value
body: <p>we have a table in an Oracle Database which contains a column with the type Char(3 Byte).<br>
  Now we use a parameterized sql to select some rows with a DBNull.Value and it doesn't work:  </p>
  
  <pre><code>OracleCommand command = null;  
  OracleDataReader dataReader = null;  
  
  string sql = "select * from TEST_TABLE where COLUMN_1 = :COLUMN_1";  
  
  try  
  {  
      OracleConnection connection = (OracleConnection) dbConnection;  
      command = new OracleCommand( sql, connection );  
  
      OracleParameter param_1 = new OracleParameter( "COLUMN_1", OracleDbType.Char );  
      command.Parameters.Add( param_1 );
  
      param_1.Value = DbNull.Value;
  
      dataReader = command.ExecuteReader( );
  
      int recordCount = 0;
      while( dataReader.Read( ) == true )
      {
          recordCount++;
      }
  
      Console.WriteLine( "Count = " + recordCount ); // is 0
  }
  [...]  
  </code></pre>
  
  <p>Did i miss something? We definitly have some rows which contains a DBNull,<br>
  but the circumstance that you would write a 'normal' sql with "is null" and not "= null"<br>
  is also noticeable.  </p>
  
  <p>Can somebody explain this behaviour? How do you write a parameterized sql where you need a condition to check for a DBNull?</p>
  
  <p>Thanks</p>