title: Copy record from one Table to another not working
body: <p>I am using the BDE and flat Tables.
  I have two identical Tables, <code>tblOne</code> and <code>tblTwo</code>
  I am trying to copy the data from one table to the other. Not the  entire DB, just one specific Record using this:</p>
  
  <pre><code>function Tdm.CopyRecord(var tblFrom,tblTo : TTable) : Boolean;
  var
    i : Integer;
  begin
    Result:=False;
    try
      tblTo.Insert;
      for i:=1 to tblFrom.FieldCount-1 do
      begin
        if tblFrom.Fields[i].FieldName = tblTo.Fields[i].FieldName then
          tblTo.Fields[i].Value:=tblFrom.Fields[i].Value;
      end;
      tblTo.Post;
      Result:=True;
    finally
    end;
  end;
  
  if CopyRecord(tblOne,tblTwo) then...
  </code></pre>
  
  <p>Stepping through this all of the Values are "Null" for the From Table.</p>
  
  <p>After the Post I get a blank record added to the <code>tblTo</code>. Not surprising with all the Values a Null. :)</p>
  
  <p>Where am I going wrong in copying the data? It is not making it to the Copy function.</p>
  
  <p>I have been at this for several hours and cannot make it work. Probably something simple I am over-looking. I added the "var" parameter to see if that made any difference but it did not.</p>
  
  <p>Oh, by the by, I am starting the loop from "1" not "0" as the first field in both files is an <code>AutoInc</code>.</p>