Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
simone_spanio
Valued Contributor

Hide Create Select Statement

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?

Thanks!

S.

1 Solution

Accepted Solutions
mark6505
Valued Contributor III

Re: Hide Create Select Statement

Hi,

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.

Mark

3 Replies
mark6505
Valued Contributor III

Re: Hide Create Select Statement

Hi,

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.

Mark

simone_spanio
Valued Contributor

Re: Hide Create Select Statement

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!

S.

MVP
MVP

Re: Hide Create Select Statement

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Community Browser