Results 1 to 3 of 3

Thread: IsConnectionIdLoggedIn generating error depending on Argument_Size

  1. #1
    Join Date
    Feb 2009
    Location
    Birmingham, UK
    Posts
    1,019

    Default IsConnectionIdLoggedIn generating error depending on Argument_Size

    Not sure where best to log this - please feel free to move as required.

    This is using DataFlex 20 but it can also be recreated in DataFlex 19.1 (and probably earlier, but haven't tried).

    Been trying to track down an odd error whereby calling IsConnectionIdLoggedIn was returning False when I'd expect it to return True. Turns out it was actually generating an error, but the error was being suppressed by the process. After a great deal of head scratching we eventually tracked it down to the fact that at the time of the call, the Argument_Size had been increased.

    To see it, you can simply code the following (although you'll need to migrate the Order Entry application to MSSQL)

    Code:
    Boolean bIsLoggedIn
    Integer iArgSize
                
    Get IsConnectionIdLoggedIn of ghoConnection 'order' to bIsLoggedIn
    Get_Argument_Size to iArgSize
    Set_Argument_Size (1024*1024)
    Get IsConnectionIdLoggedIn of ghoConnection 'order' to bIsLoggedIn
    Set_Argument_Size iArgSize
    Get IsConnectionIdLoggedIn of ghoConnection 'order' to bIsLoggedIn
    The middle call to "Get IsConnectionIdLoggedIn" will return the following error:


    C:\DataFlex\Sandbox\20.0\Order Entry\Programs\Order64.exe
    String too long. Server name longer then allocated destination 0 < 14 (DFCONNID=order).


    Error: 4101
    Error Source = MSSQLDRV.GetServerName


    GET_DRIVERSERVERNAMES (6717) - oConnection (31) - at address 29660
    GET_SERVERDATABASEIDHANDLE (6738) - oConnection (31) - at address 30010
    GET_CONNECTIONDATABASEIDHANDLE (6737) - oConnection (31) - at address 30004
    GET_ISCONNECTIONIDLOGGEDIN (6739) - oConnection (31) - at address 30022
    MSG_ONCLICK (4659) - oPrintBtn (592) - at address 82723
    MSG_COMMAND (648) - oPrintBtn (592) - in native code
    [start] - at address 94833


    (I added this particular code to the OnClick of the oPrintBtn object in the Order.vw)
    "My wife thinks I over-analyse our marriage, which, to be frank completely contradicts the findings of my report." - @MooseAllain

  2. #2
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    3,571

    Default Re: IsConnectionIdLoggedIn generating error depending on Argument_Size

    I hope we can get rid of argument_size soon!
    Samuel Pizarro

  3. #3
    Join Date
    Feb 2009
    Posts
    1,083

    Default Re: IsConnectionIdLoggedIn generating error depending on Argument_Size

    Peter,

    Nice catch, I could reproduce what you are seeing.
    We will look into it.
    Best regards,
    Data Access Worldwide

    Martin Moleman

Posting Permissions

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