1 Reply Latest reply on Jun 7, 2015 1:03 AM by BKBK

    Scope query result set in a session scope

    Abdul L Koyappayil Level 1

      Can any one help me out giving a good example to understand when should I scope a query result sets in a session scope.

        • 1. Re: Scope query result set in a session scope
          BKBK Adobe Community Professional & MVP

          In the context of session storage, there is nothing particular or special about a query result-set. You should apply the same considerations as you would for any other variable you wish to store in session scope:


          - Does the variable have a value that is distinct per user?

          - Is the user uniquely identified by his or her session?

          - Is it necessary for Coldfusion to store the value of the variable for the particular user across multiple requests?


          If so, you could define the result-set as follows:


          <cfquery name="session.myQuery">