BE Adapter StopAfter
 

BE Adapter StopAfter

4 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    23 Nov 2021
    Link to this post
    It appears the value assigned here will default to the value from the .applicationsettings when dropped on the form? Is this correct?

    Is this the value used at runtime?

    I guess my question is if we want all BE Adapter to use the same StopAfter can we override this at runtime with the value from .applicationsettings ?
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    Answered
    24 Nov 2021 in reply to Roger Blanchard
    Link to this post
    The initial value of the StopAfter property of the SmartBusinessEntityAdapter is defined in the products.i file:

        /**
         * Purpose: Value for StopAfter to be passed to the Service Interface
         * Notes:   Allows limiting the execution time of queries executed on the backend
         *          Not supported on OpenEdge 10.2B
         *          The default value for this property may be set using the DefaultStopAfter
         *          preprocessor variable in Consultingwerk/products.i
         */
        DEFINE PUBLIC PROPERTY StopAfter AS INTEGER INITIAL &IF DEFINED (DefaultStopAfter) NE 0 &THEN {&DefaultStopAfter} &ELSE 0 &ENDIF NO-UNDO
        GET.
        SET.

    Alternatively it's using the DefaultStopAfter value from the .applicationsettings. But this is just a property default - it won't override a setting defined in a Form.

    To enforce the same value to all instances, I would recommend to override the OnNewFetchDataRequest method of the SmartBusinessEntityAdapter and set the value there.
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    29 Nov 2021 in reply to Mike Fechner
    Link to this post
    Thanks Mike.
  4. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    29 Nov 2021 in reply to Roger Blanchard
    Link to this post
    Works great...thanks.
4 posts, 1 answered