3 Replies Latest reply: Nov 11, 2015 3:38 AM by Jonathan Dienst RSS

    Hide Create Select Statement

    Simone Spanio

      Hi all!


      In my script I Have two sheets, in one I have CONNECT statement to DB and I can hide it to avoid the user modify it.

      I can leave shown the second sheet, but I dont' want the user can access to DB (neither writing directly a SQL SELECT..., neither using Create Select Statement (Select button).

      I tried to use Disconnect statement but it doesn't work.


      Anyone can help me?




        • Re: Hide Create Select Statement
          Mark Little



          Not sure why you would want the user in the script and not to access things?


          One way around this is to have another QVW which exacts the data from the DB to QVD's,

          Then in the QVW that your users access, you would take out your connection string and then re-point your load statements to the relevant QVD's.


          This is how I would normally go about development any how.



            • Re: Hide Create Select Statement
              Simone Spanio

              Thanks Mark,

              the problem is about one of our subpartner's clients, and even I am too convinced.

              I suggested to have a connection to another empty db at the end of the hidden sheet, but it is not a clean solution.


              Your suggest is a chance, I'll try to wait others answers.

              Thank you!


                • Re: Hide Create Select Statement
                  Jonathan Dienst

                  The two-tier solution proposed by mark6505 is the correct way to isolate your database access.


                  The QVD generator is a normal .qvw file that the user does not have access to. This document is reloaded by the service account on your server/publisher and creates QVDs of the data being extracted. The user cannot see the connection string(s) or tamper in any way with the load script as they have no access to the document.


                  Your document would now load the data from the qvd files, so replace the SQL SELECTs wih LOAD FROM ....qvd statements. The document can be reloaded on the server, or even by the user, providing the respective accounts have access to the location where the qvds are stored.