BCS Clone A Record

There are those times when it would be helpful to clone an existing record in a table. With a few lines of code this is easily accomplished.
Establish a control to initiate the cloning action. I accomplished this by leveraging a menu item.
Within the menu item the following code will invoke the cloning mechanism.
[codesyntax lang=”delphi”]

procedure TBCSSslC.CloneARecord1Click(Sender: TObject);
  BCSSsldm.atassr.InsertRecord([nil, BCSSsldm.atassrpoc.AsString,
    BCSSsldm.atassraddr.AsString, BCSSsldm.atassrreq1.AsString,

The InsertRecord command works nicely for cloning the currently active record in a quick and dirty manner.
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems authored this article.

Leave a Reply

Your email address will not be published. Required fields are marked *