Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
When developing QVW, we uses this line of code to connect to system ODBC:
ODBC CONNECT TO [DEVSVER1;DBQ=DEVSERVER1.Mydomainname.com] (XUserId is xxxxxx, XPassword is xxxxxx);
Since our password needs to be updated every 90 days, we do not want to hard-code userid/password in qvw script like this. We also don't want to be asked for password each time when we run the qvw. Is there any way to save password along with ODBC connection? Or other solutions?
Thanks
Bo
May be creating a variables for Username and password and store them in an excel. Follow this link might help you.
HI, Vishwarath,
Thanks for your reply.
So if one dashboard access the Excel file, the file will be locked and other dashboard cannot access it at the same time. Is that correct?
Bo
Did not get you what you mean by "file will be locked" you mean excel file? No, any dashboards can access the excel file if you load data from excel. Correct me if i did not get you right.
An alternate approach could be to include username and password in an external script file, like:
SET vUsername = USERABCD;
SET vPassword = LETMEINPLEASE;
put the file in a central place (where you keep your configuration files), and include it before the ODBC CONNECT line by using a construct like this:
$(INCLUDE=C:\QlikView\Scripts\Config\DatabaseCredentials.qvs)
Change the path to whatever applies to your situation.
Don't forget to apply the correct set of (restrictive) permissions to this script file, or sooner or later everyone with access to this file can access your database.
Best,
Peter
Hi, Peter,
Thanks for your reply. I think this should work for us. But when I tried a line like the following (after creating qvs file and including it), it didn't work:
ODBC Connect TO [servername] (xUserId is vUsername, xPassword is vPassword);
Did I use it correctly?
Thanks
Bo
Try this?
ODBC Connect TO [servername] (xUserId is $(vUsername), xPassword is $(vPassword));