Copy record in the same table
Posted: Tue 14 Feb 2006 10:49
Hello, is it possible to make a copy of a record from table a and paste this record to the same table?
Or is the only solution by iterating over .Fields.Fields[]?
I thought something like this
TMyTable* table = ......;
// locate the record which has to be copied
table->LocateRecord(...);
// make a copy of the located record
table->CopyRecord();
// change few fields
table->FieldByName("d_created") = now();
table->Post();
Thanks for your help
Or is the only solution by iterating over .Fields.Fields[]?
I thought something like this
TMyTable* table = ......;
// locate the record which has to be copied
table->LocateRecord(...);
// make a copy of the located record
table->CopyRecord();
// change few fields
table->FieldByName("d_created") = now();
table->Post();
Thanks for your help