Options

NAV 2009 Flukey Issue

Rob_HansenRob_Hansen Member Posts: 296
edited 2011-02-26 in NAV Three Tier
Recently I've been hitting issues with the RTC that have been challenging. Now I've hit one in NAV2009 that occurs in both the RTC and Classic. After 10 years of working with NAV it's frustrating to struggle with things that were simple for me previously...anyway...

I'm hitting an error on a FINDSET that is saying a record in the referenced table already exists. I fail to see what scenario could cause this FINDSET to raise an error (especially considering the variable was CLEARed at the start). Two screenshots are attached. Image01 shows a debugger screenshot where the error occurs - on a FINDSET call. Image02 shows the error message. It's a message you'd expect to encounter on an INSERT with a conflicting record, but I am lost as to why some simple code to filter on a table and do a FINDSET would raise an error about a record already existing.

Any insight would be appreciated.

Comments

  • Options
    Rob_HansenRob_Hansen Member Posts: 296
    You can disregard this post. Through trial and error (commenting out all INSERTs into the referenced table one by one) I pinned down the conflict. The issue was a matter of the debugger not highlighting the problem at the point of the INSERT. I'm still not sure why it was triggering the error on a FINDSET call, and I wasted a lot of time on this, but life goes on...
  • Options
    kinekine Member Posts: 12,562
    It is because the "delayed inserts" features, where the inserts are delayed to be "inserted" in batch. And this is at the end of transaction or any FIND/GET command for same table.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    RoelofRoelof Member Posts: 377
    I had a similar issue. It drives me crazy. It took me almost all day to figure out the problem. I'm just wondering why the debugger is not able to trigger this 'delayed inserts' issue. The bottle neck is that the debugger stops at the most 'stupid' places in the code what doesn't make any sense. By try and error I finally figured out what the problem was. But is there anyone out there with a suggestion how deal with these kind of issues?

    Thanks.
    Roelof de Jonghttp://www.wye.com
  • Options
    kapamaroukapamarou Member Posts: 1,152
  • Options
    dmccraedmccrae Member, Microsoft Employee Posts: 144
    It seems like a practical solution would be to disable delayed inserts whilst debugging - delayed inserts are not important here since the act of debugging removes the necessity for performance in the debugee connection, it is more important to get ease, accuracy and clarity to aid in debugging itself.

    This is good input for the coming NAV debugger.
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
Sign In or Register to comment.