NAS problem with table data

K_Piotrowski
K_Piotrowski Member Posts: 11
I have recently installed NAS and have some strange problem. In CU1 I call a function that have endless loop. In loop I call 3 other CUs, every of them is created for another stuff... In 2nd and 3rd CU NAS cheks tables for entries, does some actions on them and then deletes them. The problem is that in first loop NAS sees data in tables, but in next loops doesn't see any data in the tables... even if I put it there. I created some messages and checked in event entries that tbl.COUNT gives 0.

What can it be??

Comments

  • hedegaard
    hedegaard Member Posts: 25
    Hello,

    maybe the data is not comitted to the database? Use Commit.
    Or you need to use selectlatestversion to retrieve an updated set of data.

    /Anders
  • DenSter
    DenSter Member Posts: 8,307
    My guess would be that when you delete the entries, you delete everything, maybe by using another variable without copying the filters over. You probably need to debug it step by step and look at all the filters while the processing is going on.
  • K_Piotrowski
    K_Piotrowski Member Posts: 11
    I did use COMMIT, CLEARALL but with no effect. SELECTLATESTVERSION did help! Thanks a lot!
  • kine
    kine Member Posts: 12,562
    Do not use the endless loop in NAS else you will be not able to terminate the service without using the task manager and killing the service directly. And yes, you need to use the SELECTLATESTVERSION to read the actual data, because you are in one BIG neverending transaction without point for refreshing data cache...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.