title: Difference between Null and Empty String in Delphi 7 and Delphi XE4
body: <p>I have a following firebird dataset: </p>
  
  <pre><code>ds1 : TpFIBDataset;
  </code></pre>
  
  <p><strong>DFM file:</strong></p>
  
  <pre><code>object ds1ID: TFIBIntegerField
   FieldName = 'ID'
  end
  object ds1FIELD_VALUE: TFIBStringField
    FieldName = 'FIELD_VALUE'
    Size = 250
  end
  </code></pre>
  
  <p>In my Firebird database: ID is integer field and FIELD_VALUE is varchar field.</p>
  
  <p><strong>Delphi 7:</strong> Data is being inserted like this</p>
  
  <pre><code>ds1.InsertRecord([123, anyValue]);
  </code></pre>
  
  <p>here <code>anyValue : variant;</code></p>
  
  <p>If anyValue = null, null is getting inserted into the database which is the required functionality. </p>
  
  <p><strong>In Delphi XE4</strong>, I am doing same like this:</p>
  
  <pre><code>ds1.Insert;
  ds1.FieldByName('ID').AsInteger := 123;
  ds1.FieldByName('FIELD_VALUE').AsString := anyValue;
  ds1.Post;
  </code></pre>
  
  <p>I get error: <code>could not convert variant of type (null) into type (OleStr)</code></p>
  
  <p>When I try like this</p>
  
  <pre><code>ds1.Insert;
  ds1.FieldByName('ID').AsInteger := 123;
  ds1.FieldByName('FIELD_VALUE').AsString := VarToStr(anyValue);
  ds1.Post;
  </code></pre>
  
  <p>Empty string is inserted into the database, but I need null there. What and where should I make change to accomplish this task.</p>