Hi there!
I want to transfer data from a table into the same table but with some diferent data.
I'm usisg the code below, but it only copies the first record. The Rec.COUNT Function return the value 3, so I dont know wat am I doing wrong...
Can anyone help me???
Rec.FIND('-');
REPEAT
Rec."Worksheet Template Name":='NEC.';
Rec.Requisitante:=USERID;
Rec."Shortcut Dimension 1 Code":='901';
ReqLineTable.TRANSFERFIELDS(Rec);
ReqLineTable.INSERT(TRUE);
UNTIL Rec.NEXT=0;
Thanks in advance
Answers
The FINDSET will read the data somewhat faster then FIND('-') on SQL.
The error was that you changed "rec" and then transferred it to the other record. After that, the NEXT command didn't find any record anymore. Now I FIRST transfer "rec" to another variable and then I change it and INSERT it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!