title: Using _Recordset result with TADOConnection.Execute function
body: <p><code>TADOConnection.Execute</code> function returns a <code>_Recordset</code>.</p>
  
  <p>I am currently using this code for simplicity <strong>(1)</strong>:</p>
  
  <pre><code>V := ADOConnection1.Execute(SQL).Fields[0].Value;
  </code></pre>
  
  <p>I know that the recordset is <strong>never empty</strong> so no worry about <code>BOF</code>.</p>
  
  <p>Now I can write it like this with a local <code>_Recordset</code> variable <strong>(2)</strong>.</p>
  
  <pre><code>var
    rs: _Recordset; 
  
    rs := ADOConnection1.Execute(SQL);
    V := rs.Fields[0].Value;
  </code></pre>
  
  <p>A bit more code.</p>
  
  <p>Now my question is: since the <code>_Recordset</code> is an interface variable returned by Execute function, would it be correctly released if I'm <strong>not using a local <code>rs</code></strong> variable <strong>(1)</strong>? is using my simplified code <strong>(1)</strong> safe and could there be a reference count issue here?</p>
  
  <p>I would like to get some insights about this issue please.</p>
  
  <hr>
  
  <p><strong>EDIT:</strong> My question is specific to the case:</p>
  
  <pre><code>V := ADOConnection1.Execute(SQL).Fields[0].Value
  </code></pre>
  
  <p>where I do not have a local variable reference to <code>_Recordset</code>.</p>