What means Err_DB_FrontLenTooLong DB_Err(1204)

Peter_KuiperPeter_Kuiper Member Posts: 19
edited 2009-03-18 in Navision Attain
Our customer is getting error 1204 "in the database structure" (module 19 (database), Err_DB_FrontLenTooLong DB_Err) while backing up the database.
Does anyone know what the cause is of this error and how we can prevent it?
(Navision 3.01A)

Comments

  • Timo_LässerTimo_Lässer Member Posts: 481
    Internal Error 1204 in module 19:
    #Err_DB_FrontLenTooLong

    This error is only valid for CODE fields.

    When a Code field is saved in the database then it is saved with an information byte.
    If the Code field only contains numbers (123..) then the information byte contains the length of the numbers, if there is saved 5 numbers in a field then the information byte will be 5.
    If alphanumerically signs are in the field then the information byte will always be 255.

    The error occurs when the information byte for alphanumerically fields not is 255.
    The error can be due to harddisk error or other program that have changed in the database.


    LOCATE THE FIELDS WITH THE ERROR:
    A DBTEST will tell you in which table the error is.

    To localize in which field the error is, you must make a report with the following code for ALL Code fields in table with the error.

    1. Make a report with the variable NEWCODE (type Code, length 132)
    2. For all Code fields in table with the error, the following lines must be run.
    EVALUATE(NEWCODE,FORMAT(Code field))
    IF NEWCODE <> CodeField then (print 'here is an error') use for an example genSELECTLINES.

    HOW TO CORRECT THE ERROR:
    When knowing the fields with the error, then just retype the information in the fields.
    If there is a lot of fields the make a report that will modify the field with NEWCODE, but remeber to print out what will be modified in the field, because the new contents might not be understandable.

    I think, my solution in this topic (http://www.mibuso.com/forum/viewtopic.php?p=13312#13312) could fix the error:
    RecRef.OPEN(DATABASE::"YourCorruptTable"); 
    IF RecRef.FIND('-') THEN 
      REPEAT 
        FOR I := 1 TO RecRef.FIELDCOUNT DO BEGIN 
          FldRef := RecRef.FIELDINDEX(I); 
          IF (UPPERCASE(FORMAT(FldRef.TYPE)) = 'CODE') AND (UPPERCASE(FORMAT(FldRef.CLASS)) = 'NORMAL') THEN 
            FldRef.VALUE := DELCHR(UPPERCASE(FldRef.VALUE),'<>'); 
        END; 
        RecRef.MODIFY; 
      UNTIL RecRef.NEXT = 0;
    
    Timo Lässer
    Microsoft Dynamics NAV Developer since 1997
    MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
  • ridczakridczak Member Posts: 8
    EVALUATE method didn't detect any field with bad data in my case, however above code (from a frame) did work. Thanks
Sign In or Register to comment.