title: Delphi: ResolveToDataset issue
body: <p>I am using a <code>TClientDataset</code> with the following options for the provider:</p>
  
  <pre><code>ResolveToDataSet = True
  Options = [poPropogateChanges, poUseQuoteChar]
  UpdateMode = upWhereKeyOnly
  AfterUpdateRecord = DataSetProvider1AfterUpdateRecord
  </code></pre>
  
  <p>The provider is connected to a TIBCQuery which manages the generator for the NO_INVOICE key.</p>
  
  <p>On AfterUpdateRecord the following code is done (as found in many places in groups to really propagate the key change when posting to the database)</p>
  
  <pre><code>DeltaDS.FieldByName(ClientDataSet1NO_INVOICE.FieldName).NewValue 
    := SourceDS.FieldByName(ClientDataSet1NO_INVOICE.FieldName).NewValue
  </code></pre>
  
  <p>The following code is then used to add a record:</p>
  
  <pre><code>  ClientDataSet1.Params[0].AsInteger := -1;
    ClientDataSet1.Open;
    ClientDataSet1.Edit;
    ClientDataSet1NO_INVOICE.AsInteger := -1;
    ClientDataSet1NO_STORE.AsInteger := 1;
    ClientDataSet1.Post;
    ClientDataSet1.ApplyUpdates(-1);
  </code></pre>
  
  <p>If I call <code>ClientDataSet1.Refresh</code> after the <code>ApplyUpdate</code>, the underlying TIBCQuery is reopened with the original param of -1 and not with the new key... even if the <code>ClientDataSet1NO_INVOICE.AsInteger</code> shows up the new value assigned after merging records...
  The use of Refresh here is only to simplify this example... The problems happens when we insert a record, apply updates and edit the record again.</p>
  
  <p>Do I miss something with the usage of the <code>ResolveToDataset</code> option or should I explicitly reopen the query with the new param?</p>
  
  <p>I never had this problem before when using <code>ResolveToDataset = False</code> on other projects...</p>