Results 1 to 10 of 10

Thread: Obsolete command Append replace on VDF19 > VDF20 conversion

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2014
    Posts
    206

    Post Obsolete command Append replace on VDF19 > VDF20 conversion

    Guys, please, i have thousands "append" command drop in my source code right now, about 3k+ file source using 'append' to fill my string variable and then use it to make queries on db.

    now in VDF20 this command is truncating my string variable

    this code below show the max length that append supports ( pay attention on red flag ):

    Code:
        Object oWsButton2 is a cGroupWsButton
            Set Size to 14 105
            Set Location to 179 95
            Set Label to 'Append Test Case'
        
            Procedure OnClick
                String sSql
                Forward Send OnClick  
    
    
                Append SSQL " Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut la "
                Append SSQL " bore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. "
    
    
                Showln sSql            
            End_Procedure 
        End_Object
    the case is that i only get error while my software is running because the vdf compiler allow this "mistake".

    i don't wanna go to a kind of global argument_size it doesn't make sense to me, and neither rewrite all files, but i think that is the case right?

    i appreciate any suggestion or encouragement words

    thanks guys
    Last edited by Salvadori; 19-Oct-2021 at 08:36 AM.

  2. #2
    Join Date
    Nov 2008
    Location
    Round Rock, TX
    Posts
    8,849

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    Hi Salvadori,

    we have confirmed this report and logged a bug.

  3. #3
    Join Date
    Jan 2009
    Location
    Richmond, VA
    Posts
    5,854

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    Salvadori,

    Just wanted to clarify that the change wasn't due to the Append command being obsolete, the Append function is also bit by the same bug.
    Best regards,

    -SWM-

  4. #4
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    5,446

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    so, as of now, no workaround on DF 20 for append function ?

    need to recheck if I am hitting that limit somewhere...
    Samuel Pizarro

  5. #5
    Join Date
    Nov 2008
    Location
    Round Rock, TX
    Posts
    8,849

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    We're still researching this.

  6. #6
    Join Date
    Mar 2009
    Posts
    1,291

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    I posted something similar some time ago, that a string within an expression is truncated to 255. However, what Salvadori reported is new to DF 20.

    https://support.dataaccess.com/Forum...ression-syntax

    Code:
    Use UI
    Procedure Test
        String s
        Move "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" to s
        Showln "Constant: " (Length(s))
        Move ("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890") to s
        Showln "Constant Expression: " (Length(s))
        Move "" to s
        Append s "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
        Showln "Append " (Length(s))
        InKey FieldIndex
    End_Procedure
    Send Test
    On 16.1 to 19.1, it will show
    400
    255
    400

    On 20 and 20.1
    400
    255
    255

    It's not so much the Append command is messing you up, it's the compiler truncating it. Feel free to examine the EXE using a HEX editor. The runtime is working just fine.

    Click image for larger version. 

Name:	Untitled.png 
Views:	34 
Size:	18.0 KB 
ID:	14961

    Frank Cheng
    Last edited by Frank Cheng; 20-Oct-2021 at 03:44 PM. Reason: Added link

  7. #7
    Join Date
    Mar 2009
    Posts
    1,291

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    Never mind, found it

    19.1 and prior
    Code:
    #COMMAND APPEND #LGULCE$ #LGULR$
    // can be useful
    //  #Warning DFERR_COMP_WARNING_OBSOLETE_STRING_CMD "Obsolete String command. Use Move (sArg + sArg2) to sArg syntax"  
      !A [] $243 !1 !2
      #IF !0>2
        APPEND !1 !3 !4 !5 !6 !7 !8 !9
      #ENDIF
    #ENDCOMMAND
    20.0+
    Code:
    #COMMAND APPEND #LGULCE$ #LGULR$
    // can be useful
    //  WarningEx GENERAL DFERR_COMP_WARNING_OBSOLETE_STRING_CMD "Obsolete String command. Use Move (sArg + sArg2) to sArg syntax"  
      Move (!1 + String(!2)) to !1
      #IF !0>2
        APPEND !1 !3 !4 !5 !6 !7 !8 !9
      #ENDIF
    #ENDCOMMAND
    That explains it pretty well.

    Frank Cheng

  8. #8
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    5,446

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    wow
    Samuel Pizarro

  9. #9
    Join Date
    Feb 2009
    Location
    Cayman Islands
    Posts
    3,969

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    "Siri, define 'meta'"...
    I should be on a beach ...

  10. #10
    Join Date
    Oct 2017
    Location
    Belgium
    Posts
    245

    Default Re: Obsolete command Append replace on VDF19 > VDF20 conversion

    Big oof.
    Last edited by WWGT; 21-Oct-2021 at 10:24 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •