Strange linkedobject behaviour

txerifftxeriff Member Posts: 492
Hi Mates,

Does any1 know under NAV2009 if there is any row limitation for linkedobject loops? I mean:


T77007.RESET;
T77007.SETRANGE(T77007.ID_TABLA_NAV,38);
IF T77007.FINDSET THEN
REPEAT

IF NOT T77015.GET(
T77007.CDSOCIED_NEW,T77007.ID_TABLA_NAV,T77007.ID_CAMPO_NAV,T77007.ID_ADM_CAMPO,T77007.ID_SERVIDOR,
T77007.ID_INSTALACION,T77007.STD_IDFISCAL_PAIS,T77007.TIPO_SICRONIZACION) THEN BEGIN
T77015.INIT;
T77015.TRANSFERFIELDS(T77007);
T77015.INSERT;
END;
UNTIL T77007.NEXT=0;


if I run this with setrange marked in bold above it works. If I leave all records (remove setrange for table 38), seems like it skips some. I cannot understand why.

any ideas?
thanks!

Edit: Linkedobject table has no PK. perhaps this is bad for NAV? Table was not defined by me, neither linkedobject.

Answers

  • lubostlubost Member Posts: 611
    1. Each NAV table must have primary key. This is the first field by default.
    2. Transferfields transfers field values by field numbers
    3. It seems, that T77015 already contains records for some T77007 records

    You should debug your code to find the reason of skipping records.
  • txerifftxeriff Member Posts: 492
    lubost wrote: »
    1. Each NAV table must have primary key. This is the first field by default.
    2. Transferfields transfers field values by field numbers
    3. It seems, that T77015 already contains records for some T77007 records

    You should debug your code to find the reason of skipping records.

    Thanks,
    It has certain key defined already.

    Im thinking maybe as they didn´t define any key in sql server table, perhaps for nav is some duplicate or who knows.

    I can´t just change the "logic" of all this interface.
Sign In or Register to comment.