Error 1192 in module 19 (Navision Attain 3.60)

Riven3Riven3 Member Posts: 4
edited 2009-02-06 in Navision Attain
Hi, I have a problem when doing a backup in Navision Attain 3.60 (I'm using native Database). It gives me error 1192 in module 19.

Table: Item
Company: (it's blank)
Key fields: Number

I've found a possible solution in an old post from Timo Lässer:

"With similar code I corrected the internal error 1192 in module 19 "BoolOutOfRange":"
RecRef.OPEN(DATABASE::"MyCorrupTable");
IF RecRef.FIND('-') THEN
  REPEAT
    FOR I := 1 TO RecRef.FIELDCOUNT DO BEGIN
      FldRef := RecRef.FIELDINDEX(I);
      IF (UPPERCASE(FORMAT(FldRef.TYPE)) = 'BOOLEAN') AND (UPPERCASE(FORMAT(FldRef.CLASS)) = 'NORMAL') THEN BEGIN
        IF FORMAT(FldRef.VALUE) = FORMAT(TRUE) THEN
          FldRef.VALUE := TRUE
        ELSE
          FldRef.VALUE := FALSE;
      END;
    END;
    RecRef.MODIFY;
  UNTIL RecRef.NEXT = 0; 

My problem is that recref is not recognized (I'm trying to put it in a report). Am I doing something wrong or must I define recref function or anything else? or maybe this code is for a different version?

Thanks in advance

EDIT: I changed recref to recordref and now that is accepted, but it says that open is not recognized when saving the report (says I must define the variable) :o

Comments

  • kinekine Member Posts: 12,562
    RecordRef is not working correctly in 3.60. To be able to use RecordRef without problems is better to use 3.70 or some latest version as best solution. On 3.60 you need to be prepared for some system bugs...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Riven3Riven3 Member Posts: 4
    Thanks for your answer. So my only solution is to migrate to 3.7? Can I do it painless? I mean, is automatic or are there big differences?
  • garakgarak Member Posts: 3,263
    Did you test it with 0 and 1?
    RecRef.OPEN(DATABASE::"MyCorrupTable");
    IF RecRef.FIND('-') THEN begin
      REPEAT
        FOR I := 1 TO RecRef.FIELDCOUNT DO BEGIN
          FldRef := RecRef.FIELDINDEX(I);
          IF (UPPERCASE(FORMAT(FldRef.TYPE)) = 'BOOLEAN') AND (UPPERCASE(FORMAT(FldRef.CLASS)) = 'NORMAL') THEN BEGIN
            IF FORMAT(FldRef.VALUE) = FORMAT(TRUE) THEN  //Why if true then set true ??????
              FldRef.VALUE := TRUE   //here test with 1
            ELSE
              FldRef.VALUE := FALSE; //here test with 0
          RecRef.MODIFY; // this we move here, because we modify only if we change some datas
          END;
        END;
      UNTIL RecRef.NEXT = 0; 
    end;
    

    Regards
    Do you make it right, it works too!
  • Riven3Riven3 Member Posts: 4
    My problem with that code is that recref is not recongnized, so I must use recordref (no problem here), but then when I save the report it says OPEN is not recognized and I must supply the variable (and we know is not a variable, it's a command)
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Riven3 wrote:
    Thanks for your answer. So my only solution is to migrate to 3.7? Can I do it painless? I mean, is automatic or are there big differences?

    You should have no problems running 3.60 objects with the 3.70B executables. There are still quite a lot of companies out there with this combination. That was the time when a lot of people stopped paying upgrade and support, so they are stuck. 3.70 does have a lot of issues on SQL, but on Native, its rock solid.
    David Singleton
Sign In or Register to comment.