Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
avula_gk
Partner - Contributor II
Partner - Contributor II

How to hide the user credentials in Qlikview which is used in macros for calling the SQL table..?

How to hide the user credentials in Qlikview which is used in macros for calling the SQL table..?

I am trying to get the data from SQL server in macros. Please let me know how to hide the credentials from External users.

 

Regards,

Ganesh

2 Replies
olivetwist
Creator
Creator

You are asking about a way to avoid hard coding your credentials?  once you establish your connection, you take the connection string and save it to a QVS file stored in a secure location that myself and my QlikView application have access to. 

In my app I add a line just before my query like:

"$(Include=j:\dbm.qvs);"

within the J:\dbm.qvs file is the connection string:

ODBC CONNECT TO DBM (XUserId is xxxxxxxxx, XPassword is yyyyyyyyyyyyyyyy); 

You could take this method, assign the include value to a variable during load then bring that variable into your macro.

Brett_Bleess
Former Employee
Former Employee

Did Olivetwist's reply get you what you needed?  If it did, be sure to click the Accept as Solution button on that post to give them credit for the assistance with things.  If you are still struggling with things, please provide and update with further information as to where things stand.

That being said, not quite sure why you are using the Edit Module for SQL calls either, best practice here is to use the Script Editor and generate the Connect statement there, which will allow you to 'hash' the credentials in the Connect string and then do your SQL Select call to pull in the data etc.  

You can also run Stored Procedures from the Script Editor etc. as well, you just need to be sure to set the Settings tab settings to allow that to occur.  

Just occurred to me, are you using Dynamic Update feature?  If so, you may want to do some further research on things, there are other/better ways to do this now than when we introduced that feature.  

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.