Hello togheter,
I have two tables 50000 and 50001 both has the fields “Name” and “Description”.
I wanna Copy all records from the the first table to the second, but it works only with the Field “Name”. somebody knows why?
IF RecordRef1.FIND(’-’) THEN REPEAT
field1 := RecordRef1.FIELD(2); // works only with 1
field2 := RecordRef2.FIELD(2); // works only with 1
field2.VALUE := field1.VALUE;
RecordRef2.INSERT;
UNTIL RecordRef1.NEXT = 0;
get the Error (translated by me to english) “‘table2’ exists already. Identified Fields and Values: Name=”
Any Ideas, Tipps?
Thanks
Well it say it’s trying to insert an empty value and that this empty value already exists. The error happens on the INSERT line.
I assume that your “Name” field is field number 2? Otherwise then I would change RecordRef1.FIELD(2) to RecordRef1.FIELD(1) or whatever field number your name fields has.
Ok this works now to Copy both Fields at the same time… but what if lets say i already copied Field No 1 (Name) and only want to Copy the Field No 2 (Description)?